Re: [Tutor] How to handle try and except in this case

2011-11-29 Thread Dave Angel
On 11/29/2011 10:35 AM, Mic wrote: -Ursprungligt meddelande- From: Dave Angel Sent: Tuesday, November 29, 2011 4:25 PM To: Mic Cc: tutor@python.org Subject: Re: [Tutor] How to handle try and except in this case (You top-posted again. Try to put your remarks AFTER the part you&#x

Re: [Tutor] How to handle try and except in this case

2011-11-29 Thread Mic
-Ursprungligt meddelande- From: Dave Angel Sent: Tuesday, November 29, 2011 4:25 PM To: Mic Cc: tutor@python.org Subject: Re: [Tutor] How to handle try and except in this case (You top-posted again. Try to put your remarks AFTER the part you're quoting, so that the messa

Re: [Tutor] How to handle try and except in this case

2011-11-29 Thread Dave Angel
(You top-posted again. Try to put your remarks AFTER the part you're quoting, so that the message is self-descriptive) On 11/29/2011 10:16 AM, Mic wrote: Could you explain what's unclear about it? Andreas couldn't get more specific, since you didn't say how these 10 names are provided. Yes,

Re: [Tutor] How to handle try and except in this case

2011-11-29 Thread Mic
Could you explain what's unclear about it? Andreas couldn't get more specific, since you didn't say how these 10 names are provided. Yes, it was probably my fault. Sorry about that. I have come up with a new way of working around a problem in my main program so I only need two files to be tes

Re: [Tutor] How to handle try and except in this case

2011-11-29 Thread Peter Otten
Mic wrote: > > On 2011-11-27 17:58, Mic wrote: >>> Say that I want to try and open 10 files. If none of these exists, I >>> want an >>> error >>> message to appear. But only if NONE of these files exists. > >>> I know how to handle this with one file. But I don't know how to do that >>> with mor

Re: [Tutor] How to handle try and except in this case

2011-11-29 Thread Dave Angel
On 11/29/2011 03:37 AM, Mic wrote: On 2011-11-27 17:58, Mic wrote: Say that I want to try and open 10 files. If none of these exists, I want an error message to appear. But only if NONE of these files exists. I know how to handle this with one file. But I don't know how to do that with mor

Re: [Tutor] How to handle try and except in this case

2011-11-29 Thread Mic
On 2011-11-27 17:58, Mic wrote: Say that I want to try and open 10 files. If none of these exists, I want an error message to appear. But only if NONE of these files exists. I know how to handle this with one file. But I don't know how to do that with more than one. So the program should try