Faking out __name__ == __main__

Ed Leafe ed at leafe.com
Sun Oct 31 19:38:19 EST 2004


On Oct 31, 2004, at 5:27 PM, Bengt Richter wrote:

> Maybe this will give you a useful idea?

	Very useful; thanks! The runtime now runs script files that use the 
'if __name__' construct. I would never have thought that you could 
modify the local namespace like that.

      ___/
     /
    __/
   /
  ____/
  Ed Leafe
  http://leafe.com/
  http://dabodev.com/




More information about the Python-list mailing list