Subprocess.Popen - passing args help
fredrik at pythonware.com
Wed Nov 2 18:53:23 CET 2005
> A nice person from another thread helped me...
> a = 'disable "@USB\VID_0403&PID_6010&MI_00\7&15E4F68&1&0000'
> print a
> disable "@USB\VID_0403&PID_6010&MI_00&15E4F68&1&0000
> \7 is the ASCII bell so your args may be different from what you think.
> I thought the quote method I have fixes this problem, but I guess I was
> wrong. Anyone have suggestions on how I can get that parameter in
> there without the '\7' part getting lost?
a = r'disable "@USB\VID_0403&PID_6010&MI_00\7&15E4F68&1&0000'
a = 'disable "@USB\\VID_0403&PID_6010&MI_00\\7&15E4F68&1&0000'
also see section 3.1.2 in the Python Tutorial, and this page:
More information about the Python-list