Success with subprocess communicate on Windows?

Tim Roberts timr at
Wed Jul 2 06:33:29 CEST 2014

Terry Reedy <tjreedy at> wrote:
>It does not work on Windows. As I reported on 
>, msg222053,
> >>> subprocess.check_output("pyflakes -h")
>works in the interpreter and Idle shell, while
> >>> s.check_output("pyflakes c:\programs\python34\lib\")
>gives bizarre output in the interpreter and hangs in the idle shell, as 
>does the code above.

Right.  What do you think \t is in a string?  (Hint: it's only one byte.)

You need to use
    s.check_output("pyflakes c:\\programs\\python34\\lib\\")
    s.check_output(r"pyflakes c:\programs\python34\lib\")
Tim Roberts, timr at
Providenza & Boekelheide, Inc.

More information about the Python-list mailing list