On Tue, 19 Apr 2005 20:17:06 -0700 (PDT), Anthony Liu <[EMAIL PROTECTED]> wrote:
>The choice is (b): > >(b) you do have "def main()" as per my example, but >you have an unguarded "main()" at the top level > >Below is exactly what I have: > >def func1(): > do_sth_1() > >def func2(): > do_sth_2() > >def main(): > do sth_m() >#end of code1.py If that's what you have, then main() won't be executed *EVER*, neither when code1 is imported, nor when it is run as a script. > >So, you suggest that if I add to the end of code1.py >module the following, > >if __name__ == "__main__": > main() > >I should be OK, right? > > Maybe, nobody can tell WTF is going on from your descriptions :-( -- http://mail.python.org/mailman/listinfo/python-list