Results of executing hyperlink in script

Tim Chase python.list at tim.thechases.com
Wed Jan 28 22:11:12 EST 2009


> 1. This method was suggested by Cameron Laird:
>
>       os.system("start %s" % URL)
>
> It works. But, if the URL contains character &, it will fail. For


As an aside, the START command is a bit picky regarding quotes. 
You have to use this horrible contortion

   os.system('start "title" "%s"' % URL)

The "title" is optional content-wise, but required positionally 
if there's a quoted resource, so you can just use

   start "" "%s"

a pain, but that's CMD.EXE for you. :)

-tkc







More information about the Python-list mailing list