All pastes #936674 Raw Edit

GoatCheez

public python v1 · immutable
·published 2008-03-10 15:59 UTC
rendered paste body
i have a function which calls os.popen this works just fine: 	p = os.popen(stmt, "r")	print p.readline()however, this does not:p = os.popen(stmt, "r")print p.readline()while 1:	line = p.readline()	print lineoh and this works too:p = os.popen(stmt, "r")line = p.readline()print lineso i can do readline outside of the while loopbut inside a while loopit returns a null value and then breaks out (according to the logic i wrote)