def setup_worker(fp, server_addr, port, counter=0, verbose=False, error_profile=None):
 if (fp is None):
  raise ValueError('setup_worker needs file path for worker')
 log_fh = None
 if verbose:
  dir = dirname((fp + '.log'))
  if (not exists(dir)):
   makedirs(dir)
  log_fh = open((fp + '.log'), 'a', 0)
 new_fp = fp
 if exists('/tmp'):
  new_fp = ('/tmp/' + split(fp)[1])
 worker = DenoiseWorker(new_fp, server_addr, port, counter=counter, log_fh=log_fh, error_profile=error_profile)
 loop()

def setup_worker ( fp , server_addr , port , counter = 0 , verbose = False , error_profile = None ) : if ( fp is None ) : raise ValueError ( 'setup_worker needs file path for worker' ) log_fh = None if verbose : dir = dirname ( ( fp + '.log' ) ) if ( not exists ( dir ) ) : makedirs ( dir ) log_fh = open ( ( fp + '.log' ) , 'a' , 0 ) new_fp = fp if exists ( '/tmp' ) : new_fp = ( '/tmp/' + split ( fp ) [ 1 ] ) worker = DenoiseWorker ( new_fp , server_addr , port , counter = counter , log_fh = log_fh , error_profile = error_profile ) loop ( )
this routine starts the worker .