[IronPython] Creating Python file from .NET stream

Dino Viehland dinov at exchange.microsoft.com
Mon Mar 13 18:02:47 CET 2006

You should be able to do:

>>> import System
>>> a = System.IO.FileStream('abc', System.IO.FileMode.Create)
>>> file(a)
<file 'F:\Product\IronPython\IronPython\abc', w+>

That should work w/ a network stream as well, but the filename will show up as "nul" in that case.

Do you want to help develop Dynamic languages on CLR? (http://members.microsoft.com/careers/search/details.aspx?JobID=6D4754DE-11F0-45DF-8B78-DC1B43134038)
-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sanghyeon Seo
Sent: Sunday, March 12, 2006 11:30 PM
To: Discussion of IronPython
Subject: [IronPython] Creating Python file from .NET stream

Beta 4 changelogs have:

"Support for constructing Python file from .NET Stream"

But I still can't figure out how to do this. Any example will be
greatly appreciated.

For example, how do I create Python file from NetworkStream?

Seo Sanghyeon
users mailing list
users at lists.ironpython.com

More information about the Ironpython-users mailing list