On Tue, Nov 17, 2009 at 9:18 PM, Peng Yu <pengyu...@gmail.com> wrote: > It's not clear to me whether WindowsError is available on linux or > not, after I read the document. But I see WindowsError in shutil.py. > Could you somebody let me know what cause the following error? > >>>> try: > ... raise WindowsError('WindowsError') > ... except WindowsError as e: > ... print e > ... > Traceback (most recent call last): > File "<stdin>", line 3, in <module> > NameError: name 'WindowsError' is not defined > --
does this answer your question? Python 2.6.4 (r264:75706, Oct 28 2009, 23:01:00) [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import shutil >>> print shutil.WindowsError None > http://mail.python.org/mailman/listinfo/python-list > -- http://mail.python.org/mailman/listinfo/python-list