Beispiel #1
0
    def load(self):
        first = True
        try:
            for line in self.input_file:
                if first and line.startswith('#'):
                    continue
                line = line.strip()
                if self.is_blank(line):
                    continue
                command = Command(free_format=self.free_format,
                                  tight=self.tight)
                command.parse(line)
                self.threads.code(0).append(command)

        except ParseError, e:
            print >> sys.stderr, e
            return False
Beispiel #2
0
    def load(self):
        first = True
        try:
            for line in self.input_file:
                if first and line.startswith('#'):
                    continue
                line = line.strip()
                if self.is_blank(line):
                    continue
                command = Command(free_format=self.free_format,
                                  tight=self.tight)
                command.parse(line)
                self.threads.code(0).append(command)

        except ParseError, e:
            print >> sys.stderr, e
            return False