[Tutor] subprocess.call list vs. str argument
Danny Yoo
dyoo at hashcollision.org
Mon Feb 24 21:50:24 CET 2014
> cmd1 = [r'sphinx-apidoc',
> r'-f -F',
This part looks suspicious. Are you sure you don't mean:
'-f', '-F'
here? They need to be separate arguments.
Also, you mention:
> Btw, shell=True is needed here.
Why do you need shell expansion on the arguments? This can be
dangerous unless you know what you're doing. See all the
red-backgrounded warnings the subprocess documentation. For example:
http://docs.python.org/2/library/subprocess.html#frequently-used-arguments
More information about the Tutor
mailing list