Skip to content

Instantly share code, notes, and snippets.

@etigui
Last active August 13, 2019 09:09
Show Gist options
  • Select an option

  • Save etigui/0e79975f2970ed1deec85ad1680df640 to your computer and use it in GitHub Desktop.

Select an option

Save etigui/0e79975f2970ed1deec85ad1680df640 to your computer and use it in GitHub Desktop.
Standard and object-oriented application main definition
# 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