简体   繁体   中英

Trying to embed a native WINDOWS command line in my Tkinter/Python app

I've done a bit of research and I've played with different graphical kits and was wondering if there was a way to display a native windows command line in my application. So, it'd be something like the command line in Jetbrains products (I think eclipse has one too), but the goal is to have 4 of them.

I've found a piece of linux software demonstrating the core concept of what I want to do and I've attached it at the bottom. Basically, I just want four terminals, and I'm going to have the app handle specific key bindings for "ease of access" tasks. I've used the linked software before and like it, but I thought as I'm exploring python it'd be a good learning experience to write something like this for windows as well!

Thanks in advance!

Edit - Google searching "Windows Tkinter Command Line" and the likes haven't been fruitful :) I promise I googled a LOT before posting here.

I dont know if there is anything readymade for this. Basically, you will need to have a text widget and simulate the output with the subprocess module to directly pass user input to run system commands and append results to the same text widget. You could also consider two windows - one for text input and one for result output.

Here is a link: Calling an external command in Python

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM