0

I'm new to python and would like to know if there is a possible way to integrate another console application into python GUI like Tkinter or any other libraries. eg. Entry(pathToFile\win.exe).pack() or Label(pathToFile\win.exe).pack()

I found ways to open the file using os modules. For eg. os.startfile(" path to file/win.exe)

But they open the application in separate window. I'm looking for a wat to have the console of the win application attached to the python GUI in one of the grid locations.

Please let me know if there is a way for this problem or a dead end.

6
  • There isn't a way built-in to tkinter but some stuff like xterm and vlc (I think) have options to put their respective windows inside a tk.Frame using a command line argument. For example for xteem there is a -into argument and you can pass in the result from winfo_id() like this Commented Apr 22, 2024 at 18:55
  • if you run console application (without GUI) then you may try to run it with subprocess.run() or subprocess.popen() and it allows to catch text from other aplication (stdout, stdin) and you may display it in tkinter.Text. And I think someone created module tkconsole which probobaly may use this method. Commented Apr 22, 2024 at 19:05
  • I found using Google: python - How to add a console to a tkinter window - Stack Overflow Commented Apr 22, 2024 at 19:10
  • I found using Google: Python interpreter console tkinter widget Commented Apr 22, 2024 at 19:11
  • I found using Google: tkterminal · PyPI Commented Apr 22, 2024 at 19:12

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.