Opening a webpage in the background via

Vlastimil Brom vlastimil.brom at
Fri Oct 8 22:11:49 CEST 2010

2010/10/7  <python at>:
> Python 2.7 (32-bit/Windows): Is there a way to use to open
> a web page in the default browser, but in the background, so that the
> application making the call remains the active
> application?
> Thank you,
> Malcolm
> --
It seems, there might not be a straightforward way for doing this.
As you probably found out, has a parameter "autoraise"
 just for specifying this behaviour:[, new=0[, autoraise=True]])
however, the sidenote in the docs also seems to apply:
"If autoraise is True, the window is raised if possible (note that
under many window managers this will occur regardless of the setting
of this variable)."

For me (win XP, python 2.5.4) the browser window is always raised
after this call, regardless the autoraise option.
Possibly, if you are using a gui app, the focus can be maintained form
there, in order to avoid activating the browser, otherwise it might be
more complicated. (maybe the pywin package might have some means for
achieving  this?)


More information about the Python-list mailing list