John Machin wrote:
On Dec 1, 2:12 pm, Joshua Kugler [EMAIL PROTECTED] wrote:
x = __import__(m)
Have you ever tried print m, x.__file__ here to check that the modules
are being found where you expect them to be found?
No, I haven't, but I do know for a fact that the only
Ok, so we have this code:
t = timeit.Timer(stmt='r()', setup='from __main__ import r')
sys.path.insert(0,'/path/to/code')
def r():
for m in ['three','module','names']:
try:
x = __import__(m)
except ImportError, e:
if not e.message.startswith('No
On Dec 1, 2:12 pm, Joshua Kugler [EMAIL PROTECTED] wrote:
Ok, so we have this code:
t = timeit.Timer(stmt='r()', setup='from __main__ import r')
sys.path.insert(0,'/path/to/code')
def r():
for m in ['three','module','names']:
try:
x = __import__(m)
Have you ever