def main(argv=None): # Figure out where Yuno lives so plugins can cd correctly if they need to. yuno_home = os.path.abspath(os.path.dirname(__file__)) setattr(config.config, 'YUNO_HOME', yuno_home) with working_dir(yuno_home): config.load_default() options, parser = cli.get_cli_args(argv or sys.argv[1:]) program = __import__('yuno.%s.%s' % (options.command, options.command), fromlist=['yuno.%s' % options.command]) program.main(options.tail)
def main(argv=None): # Figure out where Yuno lives so plugins can cd correctly if they need to. yuno_home = os.path.abspath(os.path.dirname(__file__)) setattr(config.config, 'YUNO_HOME', yuno_home) with working_dir(yuno_home): config.load_default() options, parser = cli.get_cli_args(argv or sys.argv[1:]) program = __import__( 'yuno.%s.%s' % (options.command, options.command), fromlist=['yuno.%s' % options.command] ) program.main(options.tail)
def main(argv=None): # Figure out where Yuno lives so plugins can cd correctly if they need to. yuno_home = os.path.abspath(os.path.dirname(os.path.realpath(__file__))) config.update('YUNO_HOME', yuno_home) with working_dir(yuno_home): args, subcommand_args = cli.get_cli_args() load_settings(args.runtime_settings, args.command) program = __import__( 'yuno.{command}.{command}'.format(command=args.command), fromlist=['yuno.' + args.command]) program.main(subcommand_args)
def main(argv=None): # Figure out where Yuno lives so plugins can cd correctly if they need to. yuno_home = os.path.abspath(os.path.dirname(os.path.realpath(__file__))) config.update('YUNO_HOME', yuno_home) with working_dir(yuno_home): args, subcommand_args = cli.get_cli_args() load_settings(args.runtime_settings, args.command) program = __import__( 'yuno.{command}.{command}'.format(command=args.command), fromlist=['yuno.' + args.command] ) program.main(subcommand_args)