Python: open defocused tab using webbrowser

I would like to open a new tab in my web browser using python webbrowser. However, now my browser is brought to the top, and I directly moved to the open tab. I did not find any information about this in the documentation, but maybe there are some hidden api. Can I open this tab in the most unobtrusive way, which means:

  • will not lead the browser to the top, if it is minimal,
  • Without moving me to an open tab (especially if I am currently on a different tab - my process runs in the background and it would be very unpleasant to suddenly cause my work to interrupt a new tab)?
+3
source share
1 answer

In WinXP, at least it seems that this is not possible (from my tests with IE).

From what I see, it webbrowser's a pretty simple convenience module that creates (possibly) a subprocess call into the browser executable.

If you need such a granularity, you will need to see if your browser supports command line arguments, or in some other way displays this element.

0
source

Source: https://habr.com/ru/post/1758268/


All Articles