Search Results

Search: Posts Made By: scj2012
Forum: Programming 09-18-2019
11,837
Posted By scj2012
That does work. Why does it work from the python...
That does work. Why does it work from the python shell without print?

Also I looked at 17.1. subprocess — Subprocess management — Python 2.7.16 documentation...
Forum: Programming 09-18-2019
11,837
Posted By scj2012
That doesn't work etiher. Also the exact same...
That doesn't work etiher. Also the exact same command works with subprocess.check_call. What's weird is the subprocess.check_output works in the python shell but not from the python script.
Forum: Programming 09-18-2019
11,837
Posted By scj2012
That's not going to work. I need the shlex and...
That's not going to work. I need the shlex and even if I didn't have it, it still wouldn't work.
Forum: Programming 09-18-2019
11,837
Posted By scj2012
[Python] - subprocess issue
So I have this basic script, see below

import subprocess
import shlex

command = "gcloud projects list"

subprocess.check_output(shlex.split(command))...
Showing results 1 to 4 of 4

 
All times are GMT -4. The time now is 10:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy