I'm running a script on python 3 that opens a URL using webbrowser.open() and immediately requires an input from the user. The problem is that the active window is now that of the browser instead of the python shell and an Alt-Tab or click is always required to provide the answer. You can imagine how frustrating it can be for thousands of images. The code is as simple as this:
for rP in images:
webbrowser.open(rP)
decision = str(input('Is image '+str(rP)+' ok?')
I guess there are three ways of solving this but I can't seem to find an implementation for any of them. I've tried the 'autoraise' option in the webbrowser.open() command to no avail. I'm guessing that either solution will be so simple that I'll be banging my head afterwards.
So:
Solution #1: Have a command before the input line that makes the shell window active instead of the browser.
Solution #2: Open the webpage in the background thus never leaving the shell.
Solution #3: Give the shell window an "always on top" property.
Any ideas?