':Parameters:
- `source`: either a file-like object (which is read directly), or
`None` (which implies `sys.stdin` if no `source_path` given).
- `source_path`: a path to a file, which is opened and then read.
- `encoding`: the expected text encoding of the input file.
- `error_handler`: the encoding error handler to use.
- `autoclose`: close automatically after read (boolean); always
false if `sys.stdin` is the source.
- `handle_io_errors`: summarize I/O errors here, and exit?'

def __init__(self, source=None, source_path=None, encoding=None, error_handler='strict', autoclose=1, handle_io_errors=1):

    Input.__init__(self, source, source_path, encoding, error_handler)
    self.autoclose = autoclose
    self.handle_io_errors = handle_io_errors
    if (source is None):
        if source_path:
            try:
                self.source = open(source_path)
            except IOError as error:
                if (not handle_io_errors):
                    raise
                print >>sys.stderr, ('%s:    %s' % (error.__class__.__name__, error))
                print >>sys.stderr, ('Unable    to    open    source    file    for    reading    (%r).        Exiting.' % source_path)
                sys.exit(1)
        else:
            self.source = sys.stdin
            self.autoclose = None
    if (not source_path):
        try:
            self.source_path = self.source.name
        except AttributeError:
            pass
