file objects choices?

Chermside, Michael mchermside at ingdirect.com
Tue Mar 18 13:30:27 EST 2003


> are there any existing python file i/o types that can be represented
> by file objects other than:
>     -direct files (regular, directories) specified for the open function
>     -stdin, stdout, stderr streams via sys module
>     -input from piped commands of output from program executed by os/
>         another program

StringIO and cStringIO. Also sockets via the makefile() method of socket 
objects. I'm sure there are a few others also.

And there are quite a few user-defined things that intentionally
mimic the file "protocol" since it's easy to do.

-- Michael Chermside





More information about the Python-list mailing list