Beispiel #1
0
    def __init__(self, filepath, main=False, isjson=False, tree=False):
        self.__colubridname__ = os.path.basename(filepath)
        ColubridObject.__init__(self, None)

        file_object = open(filepath, 'r')
        script = file_object.read()
        file_object.close()

        if not tree:
            if not isjson:
                script = create_json(script)
            content = json.loads(script)
            self.content = []

            for i in content:
                checked = parse(self, i, line=True)
                if checked:
                    self.content.append(checked)
        else:
            self.content = json.loads(script)

        if main:
            self.run()
Beispiel #2
0
 def __init__(self, module):
     ColubridObject.__init__(self, module)
     self.module = module
Beispiel #3
0
 def __init__(self, module, *args, **kwargs):
     ColubridObject.__init__(self, module)
     self.array = map(module.create_object, args)
Beispiel #4
0
 def __init__(self, module, *args, **kwargs):
     ColubridObject.__init__(self, module)
     self.module = module
     self.value = bool(args[0])
Beispiel #5
0
 def __init__(self, parent=None):
     self.__name__ = self.__colubridname__
     ColubridObject.__init__(self, parent)
     self.master = self
Beispiel #6
0
 def __init__(self, module, *args, **kwargs):
     ColubridObject.__init__(self, module)
     self.attributes = self.create_kwargs(kwargs)
Beispiel #7
0
 def __init__(self, module):
     ColubridObject.__init__(self, module)
     self.module = module
Beispiel #8
0
 def __init__(self, parent, *args, **kwargs):
     ColubridObject.__init__(self, parent)
     self.instructions = args
Beispiel #9
0
 def __init__(self, module, *args, **kwargs):
     ColubridObject.__init__(self, module)
     self.string = args[0]