Last active
August 13, 2019 09:09
-
-
Save etigui/0e79975f2970ed1deec85ad1680df640 to your computer and use it in GitHub Desktop.
Standard and object-oriented application main definition
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Standard | |
| import sys | |
| def main(args): | |
| # My code here | |
| pass | |
| if __name__ == "__main__": | |
| main(sys.argv) | |
| # Object-oriented | |
| class MyApplication(): | |
| # My code here | |
| pass | |
| if __name__ == "__main__": | |
| app = MyApplication() | |
| app.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment