Find the location of a loaded module

Pekka Klärck peke at iki.fi
Sun Feb 22 17:10:58 EST 2009


2009/2/21 Gabriel Genellina <gagsl-py2 at yahoo.com.ar>:
>
> Use packages. Make act1 and act2 packages by creating __init__.py files.

That's how I'd do it too. The code would be also more easy to
understand and maintain:

import act1
import act2

act1.story()
act2.story()


Alternative solution would be using reload function after changing sys.path.

Cheers,
    .peke



More information about the Python-list mailing list