eldorado wrote:

> >>> g = os.popen("ps -ef | grep HUB | grep -v grep | awk '{ print $2 }'")
> >>> h = g.readlines()
> >>> g.close()
> >>> h
> ['87334\012']
> >>> h = h[:-1]
> >>> h
> []
> >>>

I understand you're probably set, but instead of using readlines() you
could also do this:

g = os....
h = g.read().split('\n')

and then your 'h' list would not have newlines.

-tom!

-- 
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to