def call_command_async(cmd, *args, **kwargs):
 is_osx = (sys.platform == 'darwin')
 in_proc = kwargs.pop('in_proc', (not is_osx))
 if in_proc:
  return call_command_threaded(cmd, *args, **kwargs)
 else:
  if hasattr(sys, 'pyrun'):
   if (settings.IS_SOURCE and ('kalite_dir' not in kwargs)):
    kwargs['kalite_dir'] = settings.SOURCE_DIR
   if ('wait' not in kwargs):
    kwargs['wait'] = False
   return call_outside_command_with_output(cmd, *args, **kwargs)
  return call_command_subprocess(cmd, *args, **kwargs)

def call_command_async ( cmd , * args , ** kwargs ) : is_osx = ( sys . platform == 'darwin' ) in_proc = kwargs . pop ( 'in_proc' , ( not is_osx ) ) if in_proc : return call_command_threaded ( cmd , * args , ** kwargs ) else : if hasattr ( sys , 'pyrun' ) : if ( settings . IS_SOURCE and ( 'kalite_dir' not in kwargs ) ) : kwargs [ 'kalite_dir' ] = settings . SOURCE_DIR if ( 'wait' not in kwargs ) : kwargs [ 'wait' ] = False return call_outside_command_with_output ( cmd , * args , ** kwargs ) return call_command_subprocess ( cmd , * args , ** kwargs )
runs a manage .