On May 2, 1:12 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Wed, 02 May 2007 02:53:55 -0300, elventear <[EMAIL PROTECTED]> > escribió: > > > Found the offending code. I was importing between files that were at > > the same level of the hierarchy without using absolute references. > > Coded worked fine, but inspect didn't. Was this gaffe on my part? Or > > was inspect supposed to handle it? > > Could you provide an example?
Simple example My PYTHONPATH points to /python I have the following: /python/packages __init.py__ /containers __init.py__ module1.py module2.py So basically module2 depends on module1. So within module2.py I was I was doing "import module1" instead of import "packages.containers.module1". My code ran ok, but the functions in the inspect module weren't able to handle it (getfile was the source of the problem). Thanks. -- http://mail.python.org/mailman/listinfo/python-list