I'm writing a program where most of user interaction happens in Windows Command line, however I use Tkinter for some File and Directory selection dialogs.
When I start up program by clicking .py file (In IDLE the problem doesn't occur), command line is launched and when Tk root window is instantiated, it takes over the focus from command line, even if I withdraw it. This behaviour requires extra action from user to focus back on command line window.
Here is some code sample to reproduce the problem.
from tkinter import Tk
root_window = Tk()
root_window.withdraw()
name = input("Enter your name:\n")
print("Nice to meet you, " + name)
How do I keep Windows Command line in focus?