Answers for "os.system return value"

1

os.system return value

# code to perform a command line command and store out put in a variable
import subprocess as sp
command = "whoami"
output = sp.getoutput(command)
print(output)
Posted by: Guest on October-30-2021

Python Answers by Framework

Browse Popular Code Answers by Language