Beispiel #1
0
def execute(argv=None):
    '''
    Main entry point for the MADMex system.
    '''
    print madmex_copyright()
    madmex.setup()
    launcher = CommandLineLauncher(argv)
    launcher.execute()
Beispiel #2
0
def execute(argv=None):
    '''
    Main entry point for the MADMex system.
    '''
    print madmex_copyright()
    madmex.setup()
    launcher = CommandLineLauncher(argv)
    launcher.execute()
Beispiel #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.')
Beispiel #4
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.')