Re: Program __main__ function

2007-03-13 Thread André Malo
Ben Finney wrote: > Ben Finney <[EMAIL PROTECTED]> writes: > >> Now, when I write unit tests for my program (i.e. a Python module >> designed to be run as a command), it can still be imported safely >> into my unit tests, and all the code gets covered by test cases >> except the three-line stanza

Re: Program __main__ function

2007-03-12 Thread Ben Finney
Ben Finney <[EMAIL PROTECTED]> writes: > Now, when I write unit tests for my program (i.e. a Python module > designed to be run as a command), it can still be imported safely > into my unit tests, and all the code gets covered by test cases > except the three-line stanza at the end. All I need no

Program __main__ function (was: Starting Python... some questions)

2007-03-12 Thread Ben Finney
[EMAIL PROTECTED], "Greenberg <"@bag.python.org, "greenbergj\""@NOSPAM.xs4all.nl, [EMAIL PROTECTED], ">"@bag.python.org writes: > [EMAIL PROTECTED] wrote: > > * Doesn't the __main__() method automatically execute when I run > > my python program? > > No, there is no special __main__ function, to