Nov. 3, 2006
6:53 p.m.
Hi Luigi,
os.popen3() does not seem to support the read()-method? ...
os.popen3( ocr_cmd ).read() __main__:1: RuntimeWarning: tp_compare didn't return -1 or -2 for exception Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'tuple' object has no attribute 'read'
ok. this is the problem. popen returns 3 files descriptor you have to use something like:
fin, fout, ferr = os.popen3(cmd) fout.read()
Oh, this is an array :) I missed that:
# os.popen3() returns [stdin, stdout, stderr] os.popen3( ocr_cmd )[1].read()
'- Unlo_k Arhus -\n\n' Yes, you're right, that's working and probably under win9x aswell. I'll test and let you know later. Happy coding :) Vibe
7139
Age (days ago)
7139
Last active (days ago)
0 comments
1 participants
participants (1)
-
Vibe Grevsen