On Tuesday, October 9, 2012 5:24:17 PM UTC+2, Peter Otten wrote: > Seriously, you shouldn't use the main script as a library; it is put into > > the sys.modules cache under the "__main__" key. Subsequent imports under its > > real name will not find that name in the cache and import another instance > > of the module, with puzzling effects
Actually I usually never use the main script as a library, this is why I never experience this puzzling behavior before. But now it is clear, thanks. -- http://mail.python.org/mailman/listinfo/python-list