On Sunday, August 19, 2012 7:57:46 PM UTC-6, kj wrote: > This means that no library code can ever count on, for example, > > being able to reliably find the path to the file that contains the > > definition of __main__.
If you want to find that, look up __main__ in sys.modules and then look at the __file__ attribute. You need to be a bit careful with this; the import machinery was rewritten for the upcoming 3.3 release, and there were several changes to the module information. John Roth -- http://mail.python.org/mailman/listinfo/python-list