views:

49

answers:

1

I am trying to create a python script that opens a single page at a time, however python + mozilla make it so everytime I do this, it opens up a new tab. I want it to keep just a single window open so that it can loop forever without crashing due to too many windows or tabs. It will be going to about 6-7 websites and the current code imports time and webbrowser.

webbrowser.open('url') time.sleep(100) webbrowser.open('next url')

//but here it will open a new tab, when I just want it to change the page.

Any information would be greatful,

Thank you.

+1  A: 

In firefox, if you go to about:config and set browser.link.open_newwindow to "1", that will cause a clicked link that would open in a new window or tab to stay in the current tab. I'm not sure if this applies to calls from 3rd-party apps, but it might be worth a try.

Of course, this will now apply to everything you do in firefox (though ctrl + click will still open links in a new tab)

TG_Matt
Which file are you exactly talking about? I was unable to find an about: config . keep me posted, thanks for the help.
Jim
Open firefox, and type "about:config" (without the quotes) into the address bar, and hit enter. From there you can search for browser.link.open_newwindow with the "filter" bar.
TG_Matt
So did it work?
TG_Matt
Sorry for the late response, yes it did, thank you!
Jim