parameters: (name, data)
docstring: Function for writing a file.
docstring_summary: Function for writing a file.
docstring_tokens: Function for writing a file .
function: def write_file(name, data):
      """ Function for writing a file. """
      try:
          f = open(name, 'w')
          # write the data
          f.write(data)
      except IOError, (errno, strerror):
         sys.stderr.write('Failed to write file '+name+': '+strerror)
         raise
      else:
          f.close()
function_tokens: def write_file ( name , data ) : try : f = open ( name , 'w' ) # write the data f . write ( data ) except IOError , ( errno , strerror ) : sys . stderr . write ( 'Failed to write file ' + name + ': ' + strerror ) raise else : f . close ( )