Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

build cmd into Tkinter window

Tags:

python

tkinter

Hi i was wondering if you could have the comand prompt box pop into the Tkinter window when you start the program? Some thing like:

from Tkinter import *
admin = Tk()
cmd = Cmd(admin)
cmd.pack()
admin.mainloop()

I'm on windows

like image 911
P'sao Avatar asked Oct 14 '25 07:10

P'sao


1 Answers

http://tkinter.unpythonic.net/wiki/CmdTkHere is what you want, this is not just opening a cmd window. its embedding cmd.exe into a Tkinter.Frame. And a note here if you rename the python script to ".pyw" extension, the console will be hidden. Except for in a virtual environment's.

like image 170
Death_Dealer Avatar answered Oct 18 '25 10:10

Death_Dealer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!