Jump to content

Execute a system command: Difference between revisions

→‎{{header|Python}}: deprecated (disfavored) ≠ depreciated (reduced in value)
(→‎{{header|Python}}: deprecated (disfavored) ≠ depreciated (reduced in value))
Line 439:
import os
code = os.system('ls') # Just execute the command, return a success/fail code
output = os.popen('ls').read() # If you want to get the output data. DepreciatedDeprecated.
 
or
Cookies help us deliver our services. By using our services, you agree to our use of cookies.