In article ,
Thomas Jollans wrote:
>
>(3) Why not
>
>try:
>import x
>import y
>import z
>except ImportError as exc:
>display_error_properly(exc)
>raise exc
Why not? Because that destroys the original traceback. Inside an
except clause, you should almost always use a bare ra
On 06/27/10 23:20, quoth GrayShark:
> Thanks for the help
> That was what I was looking for. All the rest, the arguments were
> unhelpful.
>
> Question: If you can't answer the question, why are you talking?
>
> I'm American Indian. That's what I was taught. We don't talk that much.
> But you
On 6/28/10 12:54 PM, rantingrick wrote:
On Jun 27, 10:20 pm, GrayShark wrote:
Question: If you can't answer the question, why are you talking?
Q: If you can't take advice without complaining, then why are you
asking?
I'm American Indian. That's what I was taught. We don't talk that much.
Bu
On Jun 27, 10:20 pm, GrayShark wrote:
> Question: If you can't answer the question, why are you talking?
Q: If you can't take advice without complaining, then why are you
asking?
> I'm American Indian. That's what I was taught. We don't talk that much.
> But you get an answer when we do talk. Ma
Thanks for the help Thomas Jollans. Just what I needed. I was wondering
what the:
__import__(name, globals={}, locals={}, fromlist=[], level=-1)
globals was (that was from the docstring on __import__. Odd, the doc on
www.python.org has globals as a list, not a dictionary). In any case, I
On Jun 27, 6:09 pm, Thomas Jollans wrote:
> > import Tkinter as tk
> > try:
> > import Image #from PIL
> > print 'Using high quality images :)'
> > except ImportError:
> > print 'Using low quality images :('
>
> As such, that still appears rather useless - the following code doesn't
>
On 06/28/2010 12:48 AM, rantingrick wrote:
> On Jun 27, 5:18 pm, Thomas Jollans wrote:
>> On 06/28/2010 12:06 AM, GrayShark wrote:
>>> I have a large list of package files to import. I'm using a try/except
>>> test to verify the import. Looks like:
>
>
>
>> (1) Don't. If you need the module, th
On Jun 27, 5:18 pm, Thomas Jollans wrote:
> On 06/28/2010 12:06 AM, GrayShark wrote:
> > I have a large list of package files to import. I'm using a try/except
> > test to verify the import. Looks like:
> (1) Don't. If you need the module, there's no reason to check for
> exceptions. Just let t
On 06/28/2010 12:06 AM, GrayShark wrote:
> I have a large list of package files to import. I'm using a try/except
> test to verify the import. Looks like:
>
> try:
> import abc
> except ImportError:
> print( "Error importing abc" )
>
> I've got many of those segments. I want to try a