webbrowser.open question force Firefox

Thomas Jollans thomas at jollans.com
Mon Aug 6 06:42:10 EDT 2007


On Monday 06 August 2007, dimitri pater wrote:
> Hi,
> I have a question regarding the use of webbrowser.open.
> On a windows XP machine, MS-IE is set as the default browser so when I do:
> webbrowser.open('http://localhost:8080') IE starts with this address.
> But in stead of launching IE, I want to launch Firefox *without* setting
> Firefox as the default browser globally on this machine.
>
> Any hints, ideas? Your help is most appreciated.

take an educated guess where to find firefox, check if it's there, and do 
something like
  os.spawnl(os.P_NOWAIT, where_firefox_is, "http://localhost:8080")



-- 
      Regards,                       Thomas Jollans
GPG key: 0xF421434B may be found on various keyservers, eg pgp.mit.edu
Hacker key <http://hackerkey.com/>:
v4sw6+8Yhw4/5ln3pr5Ock2ma2u7Lw2Nl7Di2e2t3/4TMb6HOPTen5/6g5OPa1XsMr9p-7/-6
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.python.org/pipermail/python-list/attachments/20070806/8afc0b0b/attachment.sig>


More information about the Python-list mailing list