Another form of dynamic import

2009-03-25 Thread Marco Nawijn
Hello, In short I would like to know if somebody knows if it is possible to re-execute a statement that raised an exception? I will explain the reason by providing a small introduction on why this might be nice in my case and some example code. I am using the python bindings to a *very* large

Re: Another form of dynamic import

2009-03-25 Thread Kay Schluehr
On 25 Mrz., 15:23, Marco Nawijn naw...@gmail.com wrote: Hello, In short I would like to know if somebody knows if it is possible to re-execute a statement that raised an exception? I will explain the reason by providing a small introduction on why this might be nice in my case and some

Re: Another form of dynamic import

2009-03-25 Thread pruebauno
On Mar 25, 10:23 am, Marco Nawijn naw...@gmail.com wrote: Hello, In short I would like to know if somebody knows if it is possible to re-execute a statement that raised an exception? I will explain the reason by providing a small introduction on why this might be nice in my case and some

Re: Another form of dynamic import

2009-03-25 Thread Terry Reedy
Marco Nawijn wrote: In short I would like to know if somebody knows if it is possible to re-execute a statement that raised an exception? In short, no. As an example, look at the following statement aPoint = gp_Pnt(1.0, 0.0, 0.0) # Oops, this will raise a NameError, since

Re: Another form of dynamic import

2009-03-25 Thread Albert Hopkins
Also, instead of caching exceptions you can do lazy lookups kinda like this: - # a.py class A: pass - # b.py class B:

Re: Another form of dynamic import

2009-03-25 Thread Anton Hartl
On 2009-03-25, Marco Nawijn naw...@gmail.com wrote: Hello, In short I would like to know if somebody knows if it is possible to re-execute a statement that raised an exception? I will explain the reason by providing a small introduction on why this might be nice in my case and some example