[IronPython] Converting IronPython file object to .NET Stream object

Can Gencer cgencer at gmail.com
Tue Jan 4 17:43:58 CET 2011


Is there an easy way to convert an IronPython file-like object to a
.NET Stream? The reverse can be done in IronPython using like this:

net_stream = File.OpenRead('file.txt')
python_file = file(net_stream)

I wonder if there is an easy way of doing the reverse? Or do you have
to write a wrapper that will inherit from Stream and implement all the
methods?



More information about the Ironpython-users mailing list