getting an inputStream on a file

Erik Max Francis max at
Mon Aug 19 04:13:02 CEST 2002

jano wrote:

> Is there a way to get a stream on a file, for methods that require a
> stream
> as input when I want to use a file as the input.

What do you mean by "stream" vs. "file"?  File objects have a simple
interface (.read and .write methods, etc.); an arbitrary "stream" could
implement this same interface and be usable wherever a file would be

 Erik Max Francis / max at /
 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ There is nothing so subject to the inconstancy of fortune as war.
\__/ Miguel de Cervantes
    Church /
 A lambda calculus explorer in Python.

More information about the Python-list mailing list