Visit The New, Modern Unix Linux Community

Search Results

Search: Posts Made By: scj2012
Forum: Programming 09-18-2019
7,435
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
7,435
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
7,435
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
7,435
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

 

Featured Tech Videos

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