Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)
Parse a python module and return the module object.

This can then be passed to getProtectedSection() to
generate protected sections.

        def parsePythonModule(targetRoot, packagePath, fileName):
    """Parse a python module and return the module object.

    This can then be passed to getProtectedSection() to
    generate protected sections.
    """

    targetPath = os.path.join(targetRoot, packagePath, fileName)
    parsed = None
    try:
        parsed = PyParser.PyModule(targetPath)
    except IOError:
        pass
    except:
        print
        print '***'
        print '***Error while reparsing the file', targetPath
        print '***'
        print
        raise
    return parsed
        


src/a/r/archgenxml-2.6/src/archgenxml/plone/config_py.py   archgenxml(Download)
                                  'config.py')
        parsed_config = utils.parsePythonModule(
            options.option('targetRoot'),
            self.package.getFilePath(),
            'config.py')