getting an inputStream on a file

jano jnana4 at DELETEhotmailCAPS.com
Mon Aug 19 08:41:42 CEST 2002


"Erik Max Francis" <max at alcyone.com> wrote in message
news:3D608407.EEDADF3D at alcyone.com...
> jano wrote:
>

<snip/>

> By "stream," they really just mean a "file object," of which sys.stdin
> is an example.  You're passing in a filename, which isn't the same
> thing.  Instead, all you need to do is create a file with it:
>
> FromXmlStream(file(sys.stdin))
>
> or
>
> FromXmlStream(open(sys.stdin))
>
> for older versions of Python.

Okay. That makes sense now.  Thanks for the help.

jano.





More information about the Python-list mailing list