[Spambayes] Unwanted stock solicitations
grevsen at gmail.com
Fri Nov 3 19:53:18 CET 2006
>> > > 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)
Oh, this is an array :) I missed that:
>>> # os.popen3() returns [stdin, stdout, stderr]
>>> os.popen3( ocr_cmd ).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 :)
More information about the SpamBayes