import sys
from subprocess import Popen,PIPE
p = Popen(['put','command','and','arguments','here'],stdout=PIPE)
while True:
o = p.stdout.readline()
if o == '' and p.poll() != None: break
# the 'o' variable stores a line from the command's stdout
# do anything u wish with the 'o' variable here
# this loop will break once theres a blank output
# from stdout and the subprocess have ended
Written by Izhar Firdaus Follow Support
I'm a system architect, data engineer and developer advocate with passion in Free / Open Source software, entrepreneurship, community building, education and martial art. I take enjoyment in bridging and bringing together different FOSS technologies to help businesses and organizations utilize IT infrastructure to aid and optimize their business and organizational process.Calling all Malaysian Fedora users and contributors
Fedora presence in Malaysia is quite hidden from the general public. Fedora users in Malaysia are everywhere, but hard to find due to...
In
old blog,
Feb 26, 2008
Hacks: find_changed_rpms.py
Sometimes, we might be facing certain problems which we could not find what might have caused it. One of the annoying cause is a brok...
In
old blog,
Feb 28, 2008