Importing again and again

Schüle Daniel uval at rz.uni-karlsruhe.de
Thu Jun 8 20:39:55 EDT 2006


it's import-ed only once

# magic.py file

#!/usr/bin/python
print "here"
import magic	# try to import itself

then try

# bad_magic.py

#!/usr/bin/python
print "here"
import bad_magic
reload(bad_magic)


hth, Daniel



More information about the Python-list mailing list