Re: WindowsError is not available on linux?

2009-11-28 Thread Aahz
In article mailman.656.1258577952.2873.python-l...@python.org, exar...@twistedmatrix.com wrote: On 07:53 pm, a...@pythoncraft.com wrote: In article mailman.599.1258510702.2873.python-l...@python.org, Peng Yu pengyu...@gmail.com wrote: It's not clear to me whether WindowsError is available

Re: WindowsError is not available on linux?

2009-11-18 Thread Aahz
In article mailman.599.1258510702.2873.python-l...@python.org, 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. Here's what I told a co-worker to do yesterday: if os.name == 'nt': DiskError = (OSError

Re: WindowsError is not available on linux?

2009-11-18 Thread Benjamin Kaplan
On Wed, Nov 18, 2009 at 2:53 PM, Aahz a...@pythoncraft.com wrote: In article mailman.599.1258510702.2873.python-l...@python.org, 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. Here's what I told a co

Re: WindowsError is not available on linux?

2009-11-18 Thread exarkun
On 07:53 pm, a...@pythoncraft.com wrote: In article mailman.599.1258510702.2873.python-l...@python.org, 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. Here's what I told a co-worker to do yesterday

Re: WindowsError is not available on linux?

2009-11-18 Thread Christian Heimes
Dave Angel wrote: Worse, even if the exception cannot be thrown on a non-Windows environment, leaving it undefined makes it very awkward to write portable code. An except clause that can never happen in a particular environment is pretty innocent. Or somebody can use a base class for

Re: WindowsError is not available on linux?

2009-11-18 Thread Dave Angel
Benjamin Kaplan wrote: On Wed, Nov 18, 2009 at 2:53 PM, Aahz a...@pythoncraft.com wrote: In article mailman.599.1258510702.2873.python-l...@python.org, Peng Yu pengyu...@gmail.com wrote: It's not clear to me whether WindowsError is available on linux or not, after I read

Re: WindowsError is not available on linux?

2009-11-17 Thread Benjamin Kaplan
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

Re: WindowsError is not available on linux?

2009-11-17 Thread Peng Yu
On Tue, Nov 17, 2009 at 8:25 PM, Benjamin Kaplan benjamin.kap...@case.edu wrote: 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

Re: WindowsError is not available on linux?

2009-11-17 Thread MRAB
Peng Yu 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

Re: WindowsError is not available on linux?

2009-11-17 Thread Benjamin Kaplan
On Tue, Nov 17, 2009 at 9:40 PM, Peng Yu pengyu...@gmail.com wrote: On Tue, Nov 17, 2009 at 8:25 PM, Benjamin Kaplan benjamin.kap...@case.edu wrote: 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

Re: WindowsError is not available on linux?

2009-11-17 Thread alex23
Peng Yu pengyu...@gmail.com wrote: But the document doesn't say shutil need to be imported in order to use WindowsError. Shall the document or the code be corrected? Neither, it's your understanding that needs correction. Benjamin wasn't trying to say that WindowsError is defined within

Re: WindowsError is not available on linux?

2009-11-17 Thread Peng Yu
On Tue, Nov 17, 2009 at 9:18 PM, alex23 wuwe...@gmail.com wrote: Peng Yu pengyu...@gmail.com wrote: But the document doesn't say shutil need to be imported in order to use WindowsError. Shall the document or the code be corrected? Neither, it's your understanding that needs correction.

Re: WindowsError is not available on linux?

2009-11-17 Thread Dave Angel
Peng Yu wrote: On Tue, Nov 17, 2009 at 8:25 PM, Benjamin Kaplan benjamin.kap...@case.edu wrote: 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

Re: WindowsError is not available on linux?

2009-11-17 Thread alex23
Peng Yu pengyu...@gmail.com wrote: I don't know about others. The wording Windows-specific error occurs was ambiguous to me. It could refers to some errors resulted from copying (on a linux machine) some files from linux file systems to windows files systems (via samba, maybe). I recommend to

Re: WindowsError is not available on linux?

2009-11-17 Thread Chris Rebert
On Tue, Nov 17, 2009 at 7:37 PM, Peng Yu pengyu...@gmail.com wrote: On Tue, Nov 17, 2009 at 9:18 PM, alex23 wuwe...@gmail.com wrote: Peng Yu pengyu...@gmail.com wrote: But the document doesn't say shutil need to be imported in order to use WindowsError. Shall the document or the code be

Re: WindowsError is not available on linux?

2009-11-17 Thread Dave Angel
Peng Yu wrote: On Tue, Nov 17, 2009 at 9:18 PM, alex23 wuwe...@gmail.com wrote: Peng Yu pengyu...@gmail.com wrote: But the document doesn't say shutil need to be imported in order to use WindowsError. Shall the document or the code be corrected? Neither, it's your understanding