python - How to get cmd in Tkinter widget -


i'm creating tkinter gui , want add windows cmd tkinter widget. use console connect database. did research , found pyconsole module, bugs:

  • cls not going expect;
  • edit not going show editor (try start edit instead);
  • prompt fails too;
  • the color command not implemented;
  • the great ^c isn't supported (it copies text, instead of interrupting process).

especially ^c command ommited huge limitation sql scripts want run.

i'm able open console this:

popen(["cmd.exe"], creationflags=create_new_console) 

but approach don't know how interact gui (is possible?)

also text widget can read output command line, need write in command line, not read it...

is there possibility regular cmd tkinter widget, react rest of widgets in gui?

desired behaviour cmd console on right side can see on picture below (in tkinter window), interact listbox on left. i'm not looking exact code (that's why no code stated here), method/solution how put cmd tkinter.

photo: enter image description here enter image description here

thanks

honza

i think can use entry input commands want execute. can use subprocess.run , subprocess.popen execute commands, , text or better tkinter.scrolledtext.scrolledtext widget show results.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -