In article <8uvfl.45$n_6...@newsfe22.ams2>, Roel Schroeven <rschroev_nospam...@fastmail.fm> wrote: >Muddy Coder schreef: >> Hi Folks, >> >> Module os provides a means of running shell commands, such as: >> >> import os >> os.system('dir .') >> >> will execute command dir >> >> I think a hyperlink should also be executed. I tried: >> >> os.system('http://somedomain.com/foo.cgi?name=foo&passwd=bar') >> >> but I got kicked out by the Python interpreter. I wonder somebody >> knows the syntax of triggering a hyperlink? Thanks in advance! > >As others have said, you can use the webbrowser module for hyperlinks. >Alternatively you can use os.startfile() which works hyperlinks and many >types of files, but only works on Windows (it does the same as >double-clicking in Windows Explorer). . . . I suspect that os.startfile() will indeed give Muddy Coder the most immediate satisfaction. It might interest him, though, also to experiment with
os.system("start %s" % URL) Again, recognize this only gives happy results, in general, under Win*. -- http://mail.python.org/mailman/listinfo/python-list