Пример #1
0
def main():
    from uliweb.core.commands import execute_command_line
    
    apps_dir = os.path.join(os.getcwd(), 'apps')
    if os.path.exists(apps_dir):
        sys.path.insert(0, apps_dir)
       
    install_config(apps_dir)
    
    from uliweb.i18n.i18ntool import I18nCommand
    register_command(I18nCommand)
    
    execute_command_line(sys.argv, get_commands, 'uliweb')
Пример #2
0
def call(args=None):
    from uliweb.core.commands import execute_command_line
    
    apps_dir = os.path.join(os.getcwd(), 'apps')
    if os.path.exists(apps_dir):
        sys.path.insert(0, apps_dir)
       
    install_config(apps_dir)
    
    from uliweb.i18n.i18ntool import I18nCommand
    register_command(I18nCommand)
    
    if isinstance(args, (unicode, str)):
        import shlex
        args = shlex.split(args)
    
    execute_command_line(args or sys.argv, get_commands, 'uliweb')
Пример #3
0
def call(args=None):
    from uliweb.core.commands import execute_command_line
    
    apps_dir = os.path.join(os.getcwd(), 'apps')
    if os.path.exists(apps_dir):
        sys.path.insert(0, apps_dir)
       
    install_config(apps_dir)
    
    from uliweb.i18n.i18ntool import I18nCommand
    register_command(I18nCommand)
    
    if isinstance(args, (unicode, str)):
        import shlex
        args = shlex.split(args)
    
    execute_command_line(args or sys.argv, get_commands, 'uliweb')
Пример #4
0
def call(args=None):
    from uliweb.core.commands import execute_command_line

    def callback(global_options):
        apps_dir = global_options.apps_dir or os.path.join(os.getcwd(), "apps")
        if os.path.exists(apps_dir) and apps_dir not in sys.path:
            sys.path.insert(0, apps_dir)

        install_config(apps_dir)

    from uliweb.i18n.i18ntool import I18nCommand

    register_command(I18nCommand)

    if isinstance(args, (unicode, str)):
        import shlex

        args = shlex.split(args)

    execute_command_line(args or sys.argv, get_commands, "uliweb", callback)