def manage(command, args=None, as_thread=False):
 if (not args):
  args = []
 args = update_default_args(['--traceback'], args)
 if (not as_thread):
  if PROFILE:
   profile_memory()
  utility = ManagementUtility(([os.path.basename(sys.argv[0]), command] + args))
  utility.prog_name = 'kalite manage'
  utility.execute()
 else:
  get_commands()
  thread = ManageThread(command, args=args, name=' '.join(([command] + args)))
  thread.start()
  return thread

def manage ( command , args = None , as_thread = False ) : if ( not args ) : args = [ ] args = update_default_args ( [ '--traceback' ] , args ) if ( not as_thread ) : if PROFILE : profile_memory ( ) utility = ManagementUtility ( ( [ os . path . basename ( sys . argv [ 0 ] ) , command ] + args ) ) utility . prog_name = 'kalite manage' utility . execute ( ) else : get_commands ( ) thread = ManageThread ( command , args = args , name = ' ' . join ( ( [ command ] + args ) ) ) thread . start ( ) return thread
return a proxy for a db-api module that automatically pools connections .