On 2:59 PM, Carl Banks wrote:
On Sep 5, 5:07 pm, Dave Angel<da...@ieee.org>  wrote:
On 2:59 PM, Carl Banks wrote:
All of this gets a lot more complicated when packages are involved.
Perhaps a better answer would be to import __main__ from the second module.
Then what if the module is imported from a different script?  It'll
try to import __main__ but get a different script than expected.


Then the module needs to adjust its expectations. The point is it should never try to import the script by name.

DaveA

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to