os.popen3 delivers no error exist status ?
robert
no-spam at no-spam-no-spam.com
Thu Mar 2 10:56:45 EST 2006
os.popen3 delivers no error exit status on .close() - while os.popen does
Is this intended or a bug? How do I get the status?
Robert
Python 2.4.1 (#2, May 5 2005, 11:32:06)
[GCC 3.3.5 (Debian 1:3.3.5-12)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> csi,cso,cse=os.popen3('recodex latin1:utf8 <text.lat1-noexist.txt','r')
>>> csi.close();cso.read();cso.close();cse.read();cso.close()
''
'/bin/sh: line 1: text.lat1-noexist.txt: No such file or directory\n'
>>> cso=os.popen('recode latin1:utf8 <text.lat1-noexist.txt','r')
>>> sh: line 1: text.lat1-noexist.txt: No such file or directory
>>> cso.read();cso.close()
''
256
>>>
More information about the Python-list
mailing list