Velocity Reviews

Velocity Reviews (
-   Python (
-   -   Re: open URL in the current tab (

Chris Angelico 12-10-2012 11:14 PM

Re: open URL in the current tab
On Tue, Dec 11, 2012 at 9:27 AM, Jabba Laci <> wrote:
> Hi,
> With the webbrowser module you can open a URL in a new tab. But how
> could I tell Firefox from Python to open a URL in the _current_ tab?

If this is for use on somebody else's system, *please don't*. My
current tab is my business, not your program's. But if this is your
own system (eg you want to use Firefox as your GUI), there are a few
options. The easiest, I think, is to have the previous page handle the
transition - trigger it in some way, and then it simply does:

location.href = "some_new_url"

How you go about triggering this is the next problem :) But that
depends hugely on what you're trying to accomplish.


All times are GMT. The time now is 04:31 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.