Reputation: 10636
I am trying to use shlex library to run a curl command. I need to print out the errors. I have done the following but I dont see any errors.
import shlex
url='test.com'
args = shlex.split(url)
process = subprocess.Popen(args, shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout, stderr = process.communicate()
print(stderr)
It is not pringing any errors. Any ideas?
Upvotes: 0
Views: 72