code: def delete_directory(i):
      
  
      import shutil
  
      p=i['path']
  
      if os.path.isdir(p):
         shutil.rmtree(p, onerror=rm_read_only)
  
      return {'return':0}
docs: Input:  {
                path - path to delete
              }
  
      Output: {
                return       - return code =  0, if successful
                                           >  0, if error
                (error)      - error text if return > 0
              }