def _process_running(process_name):
 process_running = False
 for p in psutil.process_iter():
  for args in p.cmdline:
   if ((os.path.basename(args) == process_name) and p.is_running):
    process_running = True
 return process_running

def _process_running ( process_name ) : process_running = False for p in psutil . process_iter ( ) : for args in p . cmdline : if ( ( os . path . basename ( args ) == process_name ) and p . is_running ) : process_running = True return process_running
return whether a given process name is running .