Results of executing hyperlink in script

Tino Wildenhain tino at wildenhain.de
Thu Jan 29 01:59:58 EST 2009


Tim Chase wrote:
>> 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. :)

ah, and just for the records, at least
os.popen2,os.popen3 support tuple as argument:

i,o=os.popen2((cmd,arg1,arg2)) and quotes them
correctly.

Regards
Tino
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3241 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20090129/e7b0e190/attachment-0001.bin>


More information about the Python-list mailing list