pre-class Ponysay code is ran inside if __name__ == "__main__"

This commit is contained in:
Mattias Andrée 2012-10-28 15:59:29 +01:00
parent c1ed662fcc
commit 388a6ed142

View file

@ -2272,6 +2272,10 @@ class SpelloCorrecter(): # Naïvely and quickly proted and adapted from optimise
'''
Start the program from ponysay.__init__ if this is the executed file
'''
if __name__ == '__main__':
'''
The user's home directory
'''
@ -2464,9 +2468,5 @@ Whether at least one unrecognised option was used
unrecognised = not opts.parse()
'''
Start the program from ponysay.__init__ if this is the executed file
'''
if __name__ == '__main__':
## Start
Ponysay(opts)