Search code examples
pythonwindowslinuxmultithreadingpython-multithreading

Opening a Python thread in a new console window


I am trying to make a program that will launch both a view window (console) and a command line. In the view window, it would show constant updates, while the command line window would use raw_input() to accept commands that affect the view window. I am thinking about using threads for this, but I have no idea how to launch a thread in a new console window. How would I do that?


Solution

  • Rather than use a console or terminal window, re-examine your problem. What you are trying to do is create a GUI. There are a number of cross-platform toolkits including Wx and Tkinter that have widgets to do exactly what you want. A text box for output and an entry widget for reading keyboard input. Plus you can wrap them in a nice frame with titles, help, open/save/close, etc.