[mp3togo] abort and traceback from mp3togo
sim
reallifesim at gmail.com
Fri May 19 12:40:59 PDT 2006
On 5/19/06, Justus Pendleton <justus at ryoohki.net> wrote:
> This usually happens when you try to do I/O and have the stream set to
> be non-blocking. Instead of blocking the C library returns EAGAIN which
> Python turns into a "Resource temporarily unavailable" exception. If
> that's what you meant then you need to catch that exception and then try
> the I/O again later when the stream is available.
In main.py, stdin is cooked a bit in order to intercept key presses
for pause and stop.
The terminal is reset in a finally: clause.
Setting stdin to NONBLOCK shouldn't affect stdout, but I also use
termios to turn off echo and canonical mode.
I can make a little function that wraps sys.stdout.write() in a try:
except: clause and use that for printing messages during the loop.
I'll have to look at the log() function in options.py as well.
Still, the exception didn't happen until right at the end of encoding
the mp3. After a few thousand calls to sys.stdout.write() and a few
print statements.
I'm interested if this bug is repeatable or not. How do I know if I fix it?
--
sim
More information about the mp3togo
mailing list