Can anyone explain what is the necessity of executing whole script when importing. Isn't it enough to just put the module name in the namespace and execute when some function is called?
On Mon, Feb 2, 2009 at 1:36 PM, Stephen Hansen <apt.shan...@gmail.com>wrote: > > Maybe he can wrap the things he dont need inside > > if __name__ == '__main__': > > check. > > -- > > http://mail.python.org/mailman/listinfo/python-list > > > > Yeah but he said he doesn't want to modify the file itself-- if he can > modify the file this can all go away readily, yes. > > --S > -- > http://mail.python.org/mailman/listinfo/python-list >
-- http://mail.python.org/mailman/listinfo/python-list