Hey Hugo: I now realize that to properly test this, I should use a command that returns legitimate data: I think the following gets me started: f = os.popen('ls *.py','r').read() now I have captured the output from 'ls *.py'.
So, if I do this with popen3: >>> a,b,c = os.popen3('wt *.py','r') >>> res = a.read() Traceback (most recent call last): File "<stdin>", line 1, in ? IOError: [Errno 9] Bad file descriptor >>> err = c.read() >>> err '/bin/sh: line 1: wt: command not found\n' Then I can trap for IOError and hand either a legal response or an error. Hope I'm still on the right track. thanks tim * Hugo González Monteverde <[EMAIL PROTECTED]> [060215 20:25]: > I also noticed that if you want to get the manpage, you will be hurt by > the interactivity of 'man' (it uses less for paging) One way to get the > whole manpage as text without paging is to do: > > man -P /bin/cat > > So you won't have to do strange stuff in stdin to get it to give you the > whole text. > > Hugo -- Tim Johnson <[EMAIL PROTECTED]> http://www.alaska-internet-solutions.com _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor