code: def file(value, **kwarg):
      
      #a bit weird, but I don't want to hard code default values
      try:
          f = open(value, **kwarg)
      except IOError as e:
          raise ValueError("unable to open %s : %s" % (path.abspath(value), e))
      return f
docs: value should be a path to file in the filesystem.
      
      returns a file object