Allow this script to act like a module by only calling main() if

__name__ == '__main__'.  Closes SF bug #110844.
This commit is contained in:
Barry Warsaw 2000-09-16 22:09:51 +00:00
parent 1cca9e29f9
commit 64850efa39
1 changed files with 3 additions and 1 deletions

View File

@ -392,4 +392,6 @@ def writedict(dict, filename):
pass
os.rename(tempname, filename)
main()
if __name__ == '__main__':
main()