Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: open URL in the current tab

Reply
Thread Tools

Re: open URL in the current tab

 
 
Chris Angelico
Guest
Posts: n/a
 
      12-10-2012
On Tue, Dec 11, 2012 at 9:27 AM, Jabba Laci <(E-Mail Removed)> 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.

ChrisA
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: open URL in the current tab Jabba Laci Python 0 12-11-2012 12:05 AM
Re: open URL in the current tab Jabba Laci Python 0 12-10-2012 10:51 PM
Re: open URL in the current tab Boris FELD Python 0 12-10-2012 10:43 PM
Re: open URL in the current tab Joel Goldstick Python 0 12-10-2012 10:39 PM
open URL in the current tab Jabba Laci Python 0 12-10-2012 10:27 PM



Advertisments