Using subprocess in python 3
问题 I was using the subprocess module to run the shell command in python 3. Here is my code import subprocess filename = "somename.py" # in practical i'm using a real file, this is just for example subprocess.call("pep8 %s" % filename, shell=True)) The output for different files is just 0 or 1 . I am quite new to python 3. Using this in 2.7 gives me the desired output, but here i am not able to figure it out. This is the output i get in python 2.7 (for a file named - anu.py ) - anu.py:2:1: W191