By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,676 Members | 2,262 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,676 IT Pros & Developers. It's quick & easy.

How to hide the prompt windows when running a simple tkinter gui program?

P: 2
In windows, if I make a very simple tkinter program like:

from Tkinter import *
root = Tk()
label = Label(root,text="hello")
label.pack()
root.mainloop()


There will be a window showing the "hello" label, and another windows that looks like a dos prompt behind it. Is it possible to get rid of this prompt like window?
Mar 18 '08 #1
Share this Question
Share on Google+
2 Replies


P: 43
In windows, if I make a very simple tkinter program like:

from Tkinter import *
root = Tk()
label = Label(root,text="hello")
label.pack()
root.mainloop()


There will be a window showing the "hello" label, and another windows that looks like a dos prompt behind it. Is it possible to get rid of this prompt like window?
I believe saving it with the .pyw extension should fix that.
Mar 18 '08 #2

P: 2
I believe saving it with the .pyw extension should fix that.
Thanks very much, it works. I search further with this pyw and found that it works because it will use pythonw to run the program instead of python.
Mar 19 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.