Execute a system command: Difference between revisions

No edit summary
Line 92:
 
'''Note:''' The latter is the preferred method for calling external processes, although cumbersome, it gives you finer control over the process.
 
or
 
'''Interpreter:'''[[Python]] 2.2 (and above)
 
import commands
stat, out = commands.getstatusoutput('ls')
if not stat:
print out
 
==[[Ruby]]==
Anonymous user