WindowsError is not available on linux?
aahz at pythoncraft.com
Sat Nov 28 18:40:08 CET 2009
In article <mailman.656.1258577952.2873.python-list at python.org>,
<exarkun at twistedmatrix.com> wrote:
>On 07:53 pm, aahz at pythoncraft.com wrote:
>>In article <mailman.599.1258510702.2873.python-list at python.org>,
>>Peng Yu <pengyu.ut at gmail.com> wrote:
>>>It's not clear to me whether WindowsError is available on linux or
>>>not, after I read the document.
>>Here's what I told a co-worker to do yesterday:
>>if os.name =3D=3D 'nt':
>> DiskError =3D (OSError, WindowsError)
>> DiskError =3D WindowsError
>This isn't necessary. WindowsError subclasses OSError.
Thanks! Much appreciated! (I haven't done much Windows programming in
the past -- and would have preferred to keep it that way. ;-)
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
The best way to get information on Usenet is not to ask a question, but
to post the wrong information.
More information about the Python-list