示例#1
0
def execute(argv=None):
    '''
    Main entry point for the MADMex system.
    '''
    print madmex_copyright()
    madmex.setup()
    launcher = CommandLineLauncher(argv)
    launcher.execute()
示例#2
0
def execute(argv=None):
    '''
    Main entry point for the MADMex system.
    '''
    print madmex_copyright()
    madmex.setup()
    launcher = CommandLineLauncher(argv)
    launcher.execute()
示例#3
0
def handle_default_options(options):
    """
    Include any default options that all commands should accept here
    so that ManagementUtility can handle them before searching for
    user commands.

    """
    if getattr(options, 'settings'):
        os.environ['MADMEX_SETTINGS_MODULE'] = options.settings
        SETTINGS.reload()
        setup()
        LOGGER.info('Settings loaded from %s.', options.settings)
    if getattr(options, 'pythonpath'):
        sys.path.insert(0, options.pythonpath)
        LOGGER.info('%s was added to the PYTHONPATH.', options.settings)
    LOGGER.debug('Default options had been handled.')
示例#4
0
文件: base.py 项目: makeling/antares
def handle_default_options(options):
    """
    Include any default options that all commands should accept here
    so that ManagementUtility can handle them before searching for
    user commands.

    """
    if getattr(options, 'settings'):
        os.environ['MADMEX_SETTINGS_MODULE'] = options.settings
        SETTINGS.reload()
        setup()
        LOGGER.info('Settings loaded from %s.', options.settings)
    if getattr(options, 'pythonpath'):
        sys.path.insert(0, options.pythonpath)
        LOGGER.info('%s was added to the PYTHONPATH.', options.settings)
    LOGGER.debug('Default options had been handled.')