parameters: (command, logPath, line, deleteFolder=None)
docstring: Run the command and log the result
docstring_summary: Run the command and log the result
docstring_tokens: Run the command and log the result
function: def processAndLog(command, logPath, line, deleteFolder=None):
      '''Run the command and log the result'''
      
      print(command)
      #os.system(command)
      time.sleep(2) # DEBUG
      
      # TODO: How to check for an error?
      
      with open(logPath, 'a') as f:
          f.write(line + '\n')
  
      print('Finished running: ' + command)
      
      if deleteFolder:
          print('Cleaning up folder: ' + deleteFolder)
          cleanup = 'rm -rf ' + deleteFolder
function_tokens: def processAndLog ( command , logPath , line , deleteFolder = None ) : print ( command ) #os.system(command) time . sleep ( 2 ) # DEBUG # TODO: How to check for an error? with open ( logPath , 'a' ) as f : f . write ( line + '\n' ) print ( 'Finished running: ' + command ) if deleteFolder : print ( 'Cleaning up folder: ' + deleteFolder ) cleanup = 'rm -rf ' + deleteFolder