[IronPython] file.mode property doesn't exist
Dave Fugate
dfugate at microsoft.com
Thu Mar 6 19:10:42 CET 2008
Thanks for the bug report. Filed as CodePlex 15484 - http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=15484.
-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of William Reade
Sent: Thursday, March 06, 2008 3:02 AM
To: users at lists.ironpython.com
Subject: [IronPython] file.mode property doesn't exist
Hi
----------------------------------------------------------------
IronPython 1.1.1 (1.1.1) on .NET 2.0.50727.312
Copyright (c) Microsoft Corporation. All rights reserved.
>>> f = open("text.txt")
>>> f.mode
Traceback (most recent call last):
File , line 0, in <stdin>##82
AttributeError: 'file' object has no attribute 'mode'
>>>
----------------------------------------------------------------
Would it be possible to implement this property? I'm trying to implement
PyFile_AsFile for Ironclad, and it would be enormously helpful to be
able to retrieve a file's mode (for _fdopen in msvcrt.dll) without
either (1) depending on a custom IronPython or (2) reflecting the real
IronPython half to death.
For now, I'm just going to assume that all files have been opened for
reading, so I can get some useful functionality without it; still, I'd
be very grateful if you would slip this into a nearish-future release
(or, ofc, tell me what I failed to notice that makes my request
unnecessary ;-) ).
Cheers
william
_______________________________________________
Users mailing list
Users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
More information about the Ironpython-users
mailing list