[IronPython] File as TextReader

Dino Viehland dinov at exchange.microsoft.com
Tue Dec 18 18:33:26 CET 2007

This looks ok to me.  Everything is either standard Python or standard .NET.

The additional conversions also sound like a good idea.  We already support a number of conversions to .NET (e.g. things like lists and tuples can turn into List<T>) but we probably just need to go through a lot of types and add implicit or explicit conversions.  I could file->text reader being implicit but I think date time needs to be explicit (Python's date time has higher precision than .NET so we'd lose some info).

Any other types?  I've opened bug #14453 - if anyone can think of other conversions you can either respond here or comment on the bug.

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sanghyeon Seo
Sent: Monday, December 17, 2007 8:29 PM
To: Discussion of IronPython
Subject: [IronPython] File as TextReader

I wrote a short howto on passing Python's file-like objects to .NET
API expecting TextReader.


1. Does this look okay? It does work.

2. It would be nice if IronPython can provide conversions like these.
Another example would be Python datetime and .NET DateTime. Already
implemented example is constructing Python file from .NET Stream. What
do you think?

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

More information about the Ironpython-users mailing list