Package docutils :: Module io :: Class FileInput
[show private | hide private]
[frames | no frames]

Class FileInput

TransformSpec --+    
                |    
            Input --+
                    |
                   FileInput


Input for single, simple file-like objects.
Method Summary
  __init__(self, source, source_path, encoding, autoclose)
  close(self)
  read(self)
Read and decode a single file and return the data.
    Inherited from Input
  __repr__(self)
  decode(self, data)
Decode a string, data, heuristically.

Class Variable Summary
    Inherited from Input
str component_type = 'input'
NoneType default_source_path = None                                                                  
    Inherited from TransformSpec
tuple default_transforms = ()

Method Details

__init__(self, source=None, source_path=None, encoding=None, autoclose=1)
(Constructor)

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.
autoclose - close automatically after read (boolean); always false if sys.stdin is the source.
Overrides:
docutils.io.Input.__init__

read(self)

Read and decode a single file and return the data.
Overrides:
docutils.io.Input.read

Generated by Epydoc 2.0 on Tue Jul 22 05:30:25 2003 http://epydoc.sf.net