Skip to content

Instantly share code, notes, and snippets.

@kaydell
Created October 9, 2013 15:23
Show Gist options
  • Save kaydell/6903031 to your computer and use it in GitHub Desktop.
Save kaydell/6903031 to your computer and use it in GitHub Desktop.
Python 3 GUI Starting Point
#!/usr/bin/env python3
def main():
# require Python 3
import sys
if sys.version_info.major < 3:
print("This program requires Python 3 or later")
return
# import Python's standard GUI module
import tkinter
# create a window
top = tkinter.Tk()
# Code to add widgets will go here...
# turn control over to tkinter
# it can call back your code as necessary
top.mainloop()
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment