[pypy-dev] Unusual problem.
Maciek Fijalkowski
fijal at genesilico.pl
Tue May 29 18:44:19 CEST 2007
I want to wrap termios lib, also for RPython. everything works quite
smooth except error reporting.
termios.tcgetattr (and others as well) use termios.error for error
reporting, which is exception which cannot be used in a translated
version. Hence my ll_termios_tcgetattr raises OSError
instead (it's not mentioned anywhere in documentation of termios
library, nor present in any CPython tests, but well...)
So than arises a problem - ll version rises OSError, while default one
raises termios.error, which makes everything harder to test (ie the same
RPython program behaves differently before and after translation). What
is casual solution here? Also any magic wrapping doesn't work here,
since termios is a builtin module.
Cheers,
fijal
More information about the Pypy-dev
mailing list