mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Allow this script to act like a module by only calling main() if
__name__ == '__main__'. Closes SF bug #110844.
This commit is contained in:
parent
1cca9e29f9
commit
64850efa39
1 changed files with 3 additions and 1 deletions
|
@ -392,4 +392,6 @@ def writedict(dict, filename):
|
|||
pass
|
||||
os.rename(tempname, filename)
|
||||
|
||||
main()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue