Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #34579
| References | <CAOuJsM=ch3T=L3+7rQ=sg5t_LmA5v_nXJLYYTw7ySD30Vmx+qA@mail.gmail.com> |
|---|---|
| Date | 2012-12-11 10:14 +1100 |
| Subject | Re: open URL in the current tab |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.691.1355181303.29569.python-list@python.org> (permalink) |
On Tue, Dec 11, 2012 at 9:27 AM, Jabba Laci <jabba.laci@gmail.com> 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
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: open URL in the current tab Chris Angelico <rosuav@gmail.com> - 2012-12-11 10:14 +1100
csiph-web