Tim Golden added the comment:
Really this should be a wont-fix: the fact that it's possible to import
WindowsError from shutil (on Linux) is an accident of its internal
implementation. It's certainly not documented as such.
Saurabh: WindowsError is a builtin on Windows. If you want to mimic shutil
which uses it as a proxy for determining the platform, you can put a
conditional import at the head of your own code:
try:
WindowsError
except NameError:
WindowsError = None
Don't bother trying to import it from shutil where it's an implementation
artefact.
----------
nosy: +tim.golden
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue18525>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com