Answer the question
In order to leave comments, you need to log in
How to maximize console window or dock it on top of windows using python?
It is necessary, under some condition in the program, to fix or focus (expand) the python console window
Answer the question
In order to leave comments, you need to log in
If under Windows, then you will have to use WinAPI.
GetConsoleWindow() to get a handle to the console window.
SetForegroundWindow() to make this window the active window.
SetWindowPos() is generally for moving/resizing the window, but also has parameters for setting the window "on top".
For calling WinAPI functions from python, see the ctypes module .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question