parameters: (filename)
docstring: Return true if file exists and is accessible for reading.
  
      Should be safer than just testing for existence due to links and
      permissions magic on Unix filesystems.
  
      @rtype: boolean
docstring_summary: Return true if file exists and is accessible for reading.
docstring_tokens: Return true if file exists and is accessible for reading .
function: def file_exists(filename):
      """Return true if file exists and is accessible for reading.
  
      Should be safer than just testing for existence due to links and
      permissions magic on Unix filesystems.
  
      @rtype: boolean
      """
  
      try:
          f = open(filename, 'r')
          f.close()
          return True
      except IOError:
          return False
function_tokens: def file_exists ( filename ) : try : f = open ( filename , 'r' ) f . close ( ) return True except IOError : return False