#!/usr/bin/python
import os
os.system("ls -l")
or
import os
buffer=os.popen("ls -l")
for i in buffer.readlines():
print "Result:",i,
or
from subprocess import call
call(["ls", "-l"])
import os
os.system("ls -l")
or
import os
buffer=os.popen("ls -l")
for i in buffer.readlines():
print "Result:",i,
or
from subprocess import call
call(["ls", "-l"])
No comments :
Post a Comment