IronPython 1.0 - Bugs or Features?

Robin Becker robin at
Wed Sep 6 18:31:03 CEST 2006

Claudio Grondi wrote:
> Another problem with IronPython where CPython 2.4.2 runs ok was while I 
> was trying to do:
>    f = file(r'\\.\PhysicalDrive0', 'rb')
> getting "ValueError: FileStream will not open Win32 devices such as disk 
> partitions and tape drives. Avoid use of "\\.\" in the path."
> Here the same - I am not sure if it is a bug or a feature.
> Can someone knowledgeable elaborate on it a bit please?
I guess it's M$ being overprotective. Certainly it works in CPython as expected,

 >>> f = file(r'\\.\PhysicalDrive0', 'rb')
 >>> f
<open file '\\.\PhysicalDrive0', mode 'rb' at 0x01292650>

I have used similar to get boot sectors etc, but then did you really think Bill 
would let us play with our own hardware?  Just wait till DRM gets here.
Robin Becker

More information about the Python-list mailing list