Package xdp :: Package io :: Module text
[show private | hide private]
[frames | no frames]

Module xdp.io.text

Read and write plain-text files of data.

Any lines at the start of the file beginning with the symbols '#', '!', or ';' are treated as headers and discarded.
Classes
Text The (empty) header of a plain-text file.

Function Summary
2-tuple of the form (header, data) readTextFile(stream, comments)
Read plain-text data from an input stream.

Function Details

readTextFile(stream, comments='#!;')

Read plain-text data from an input stream.
Parameters:
stream - input stream
           (type=file)
comments - comment-delimiting characters (defaults to #!;)
           (type=string)
Returns:
header and data
           (type=2-tuple of the form (header, data))
Raises:
IOError - the data was malformed

Notes:

  • This function will fail on input streams which don't support the seek method.
  • The columns in the resulting dataset are named column##.


Generated by Epydoc 2.1 on Wed Jul 20 11:51:04 2005 http://epydoc.sf.net