def createNodeTree( filename ): """ Create a node tree. Turn that source code into a node tree structure. If recursion into imported modules is available, more trees will be available too. """ return TreeBuilding.buildModuleTree( filename )
def makeMainSource( tree ): generator_module = Generator.PythonModuleGenerator( module_name = "__main__", ) other_modules = TreeBuilding.getOtherModules() if tree in other_modules: other_modules.remove( tree ) for module in other_modules: _prepareCodeGeneration( module ) _prepareCodeGeneration( tree ) source_code = CodeGeneration.generateExecutableCode( main_module = tree, other_modules = other_modules, generator = generator_module ) return source_code