Python program and module

if __name__ == '__main__':
    main()
else:
    # module-specific initialization code if any
It its's called as a script, it will be run with the name __main__ and the controlling function, main, well be called. If it has been imported into an interactive session or another module, its name will be its filename.

0 意見: