parameters: (self, work_dir)
return_statement: return True, ''
docstring: Set up the directory for working result
          :return: (boolean, string)
docstring_summary: Set up the directory for working result
          :return: (boolean, string)
docstring_tokens: Set up the directory for working result : return : ( boolean string )
function: def set_working_directory(self, work_dir):
          """
          Set up the directory for working result
          :return: (boolean, string)
          """
          if os.path.exists(work_dir) is False:
              try:
                  os.mkdir(work_dir)
              except OSError as os_err:
                  return False, 'Unable to create working directory %s due to %s.' % (work_dir, str(os_err))
          elif os.access(work_dir, os.W_OK) is False:
              return False, 'User specified working directory %s is not writable.' % work_dir
  
          self._workDir = work_dir
  
          return True, ''
function_tokens: def set_working_directory ( self , work_dir ) : if os . path . exists ( work_dir ) is False : try : os . mkdir ( work_dir ) except OSError as os_err : return False , 'Unable to create working directory %s due to %s.' % ( work_dir , str ( os_err ) ) elif os . access ( work_dir , os . W_OK ) is False : return False , 'User specified working directory %s is not writable.' % work_dir self . _workDir = work_dir return True , ''