Ejemplo n.º 1
0
    def compileUi(self, input_stream, output_stream):
        createCodeIndenter(output_stream)
        w = self.parse(input_stream)

        indenter = getIndenter()
        indenter.write("")

        self.factory._cpolicy._writeOutImports()

        for res in self._resources:
            indenter.write("import %s" % res)

        return {"widgetname": str(w),
                "uiclass" : w.uiclass,
                "baseclass" : w.baseclass}
Ejemplo n.º 2
0
    def compileUi(self, input_stream, output_stream, from_imports, resource_suffix):
        createCodeIndenter(output_stream)
        w = self.parse(input_stream, resource_suffix)

        indenter = getIndenter()
        indenter.write("")

        self.factory._cpolicy._writeOutImports()

        for res in self._resources:
            write_import(res, from_imports)

        return {"widgetname": str(w),
                "uiclass" : w.uiclass,
                "baseclass" : w.baseclass}
Ejemplo n.º 3
0
            def compileUi(self, input_stream, output_stream, from_imports):
                indenter.createCodeIndenter(output_stream)
                w = self.parse(input_stream)

                output = indenter.getIndenter()
                output.write("")

                self.factory._cpolicy._writeOutImports()
                
                for res in self._resources:
                    output.write("from prymatex import %s" % res)
                    #write_import(res, from_imports)

                return {"widgetname": str(w),
                        "uiclass" : w.uiclass,
                        "baseclass" : w.baseclass}
Ejemplo n.º 4
0
            def compileUi(self, input_stream, output_stream, from_imports):
                indenter.createCodeIndenter(output_stream)
                w = self.parse(input_stream)

                output = indenter.getIndenter()
                output.write("")

                self.factory._cpolicy._writeOutImports()

                for res in self._resources:
                    output.write("from prymatex import %s" % res)
                    #write_import(res, from_imports)

                return {
                    "widgetname": str(w),
                    "uiclass": w.uiclass,
                    "baseclass": w.baseclass
                }