Python Forum
Embed Python console in GUI application
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Embed Python console in GUI application
#1
I am trying to figure out how best to provide access to a python interpreter from inside a GUI based program. The GUI is the interface for a process controller. Starting the GUI can take a long time because it involves booting multiple subsystems and turning on machinery in the proper sequence with lots of waiting for things to complete. If something goes wrong I would like a way to peek around inside the controller and maybe even try a patch before shutting things down and having to restart.

Looking for "embedded console", "gui console", "interactive interpreter", "python terminal" has pointed me to code.InteractiveConsole which is exactly what I want, except I don't see how I can hook this to a text editor widget inside the GUI. I am using Qt Widgets (PySide2), so QtConsole popped up, but that is about 100 times more powerful than I need and can I even use it outside of Jupyter?

I'd appreciate any suggestions or paths to pursue in my investigations. If you think my approach to solving this problem is off track I would appreciate hearing that too. I'm a C, C++, C# programmer and a lot of Python catches me off guard. Maybe I am completely backward (again) and I should be thinking of using a tool outside my GUI application instead of trying to shoehorn one into it.
Reply


Messages In This Thread
Embed Python console in GUI application - by deanhystad - Mar-20-2020, 04:50 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Application development in Python muralikreddy 4 2,998 Mar-27-2024, 12:05 AM
Last Post: anastasiastefanyuk
  How to make cross platform gui python application ? Jayam 2 3,861 Dec-24-2021, 03:24 PM
Last Post: Linenloid
  [PyQt] Embed Google Maps in PyQt6 Widget Raures 2 3,125 Sep-11-2021, 04:32 PM
Last Post: Raures
  [PyGUI] Python Application Not Finding Excel File dseals26 2 2,877 Feb-17-2021, 01:45 AM
Last Post: thewolf
  Python Application in Taskbar constantin01 3 6,044 Jan-24-2020, 10:57 AM
Last Post: buran
  Interacting with python console while program is running Murmele 2 3,351 Feb-10-2018, 05:43 PM
Last Post: kmcollins
  Python Wrapper Application panick1992 8 6,720 Mar-15-2017, 11:54 PM
Last Post: micseydel

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020