try: # For Python 2.x import Tkinter as tk except ImportError: # For Python 3.x import tkinter as tk app_win = tk.Tk() app_win.title('Hello World') app_frame = tk.Frame(app_win) app_win.mainloop()
[Tkinter] [Very Basic Example Only] Hello World
[Tkinter] [Very Basic Example Only] Hello World
|
Oct-05-2016, 09:35 PM
I don't understand the app_ prefix. This has (almost) nothing to do with this post... it's used everywhere. Obviously it's your app, why would you need to remind yourself of that. Wouldn't it make more sense, and be easier to read, if the variables were simply "win" and "frame"?
Oct-08-2016, 08:32 AM
They are just variable names you can name then however you like :) , this is just code by wuf copied from the old forum
|
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
[WxPython] [Very Basic Example Only] Hello World | Yoriz | 5 | 7,703 |
Oct-08-2016, 06:33 PM Last Post: Yoriz |
Users browsing this thread: 1 Guest(s)