[Tutor] subprocess.call list vs. str argument

Peter Otten __peter__ at web.de
Mon Feb 24 21:59:04 CET 2014


Peter Otten wrote:

>> r'-f -F',
>> r'-H', '"%s"' % title,
> 
> "title" becomes \"title\", i. e. Python puts in an extra effort to have
> the quotes survive the subsequent parsing process of the shell:
> 
>>>> print subprocess.list2cmdline(['"title"'])
> \"title\"

Forget that :( 

Danny spotted the real problem.



More information about the Tutor mailing list