ANN: Tk Slashdot Headline Viewer

Brian E Gallew geek+ at cmu.edu
Tue Sep 14 12:00:54 EDT 1999


From: pj at sgi.com (Paul Jackson)
> Brian wrote:
> |> And browser should look like:
> |> browser = "/usr/local/bin/netscape -remote 'openURL(%s)'"
> 
> Don't assume that particular path for netscape.

Well, of course you're right.  Further, you should do it like:
browser = "netscape -remote 'openURL(%s)' || netscape %s &"

and then insert the URL into there twice in tye system call:
os.system(browser % (url, url))

This way, if netscape isn't already running, we can deal with it.

-- 
=====================================================================
| JAVA must have been developed in the wilds of West Virginia.      |
| After all, why else would it support only single inheritance??    |
=====================================================================
| Finger geek at cmu.edu for my public key.                            |
=====================================================================
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 266 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/19990914/18a6c017/attachment.sig>


More information about the Python-list mailing list