Problem working with subprocess.check_call
Laura Creighton
lac at openend.se
Thu Oct 29 06:11:17 EDT 2015
In a message of Thu, 29 Oct 2015 09:52:56 +0000, David Aldrich writes:
>Hi
>
>I am working on Linux with Python 3.4.
>
>I want to do a bash diff on two text files and show just the first 20 lines of diff's output. So I tried:
>
>>>> cmd = 'head -20 <(diff ' + file1 + ' ' + file2 + ')'
>>>> subprocess.check_call(cmd, shell=True)
I am reading https://docs.python.org/3.5/library/subprocess.html
because my first thought was that shell should be False here.
The doc doesn't say. Filing doc bug now.
Laura
More information about the Python-list
mailing list