[Tutor] (no subject)
Andreas Perstinger
andreas.perstinger at gmx.net
Sat Nov 12 13:19:28 CET 2011
On 2011-11-12 10:33, Alan Gauld wrote:
> On 11/11/11 22:17, Andreas Perstinger wrote:
>
>> I don't know about windows but if you want to run the script from the
>> command line you have to add:
>>
>> if __name__ == "__main__":
>> main()
>
> No, you only need to do that if you plan on using the file as a module
> at some point. If you don't need a module then the OPs style will work
> just fine on any OS.
Of course you're right. Sorry for the misinformation. It was probably
too late in the evening when I wrote this yesterday :-(.
Bye, Andreas
More information about the Tutor
mailing list