On Sun, May 26, 2013 at 4:58 PM, Luca Cerone <luca.cer...@gmail.com> wrote:
<snip>
> Hi Chris, first of all thanks for the help. Unfortunately I can't provide the 
> actual commands because are tools that are not publicly available.
> I think I get the tokenization right, though.. the problem is not that the 
> programs don't run.. it is just that sometimes I get that error..
>
> Just to be clear I run the process like:
>
> p = subprocess.Popen(['program1','--opt1','val1',...'--optn','valn'], ... the 
> rest)
>
> which I think is the right way to pass arguments (it works fine for other 
> commands)..
<snip>
>> You may also want to provide /dev/null as p1's stdin, out of an abundance of 
>> caution.
>
> I tried to redirect the output to /dev/null using the Popen argument:
> 'stdin = os.path.devnull' (having imported os of course)..
> But this seemed to cause even more troubles...

That's because stdin/stdout/stderr take file descriptors or file
objects, not path strings.

Cheers,
Chris
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to