Modal mode for `webbrowser.open()`
webbrowseroffers the handy function
openwhich allows opening a webpage as a tab page in the console. I would have expected that when using
modal=TruePythonista would switch to the appropriate tab in the console which has just been loaded and let the user browse the web page. After the user presses "Done" Pythonista would return to the script (and the screen) that the call was made from. Unfortunately, this does not work for me. The web page is loaded alright, but the console is not shown. So there's no way for the user to see the page without stopping the running script. Is this intended? Thanks!
marcus67 last edited by marcus67
Nobody answered so far. @omz: Could you help me with this, please? Thanks!
JonB last edited by
You might prefer to use a WebView, which you can pop up in a pover or sheet, that way you have control, plus your script could interact with the webview, or the webview delegate can accept callbacks from the webview, etc.
@JonB Yes, I might try that. It just seemed so handy to use the existing feature... :-)