Open dong-zeyu opened 3 years ago
This seems reasonable to me. Sorry to have left it so long without looking at it. If you're still interested, could you add a test of using the arguments for unicode decoding?
Thanks for your reply. A test was added. It will try to print some non-utf8 char and check whether the error handling argument is taking effect.
Hmm, it seems like there's something funny going on with the tests on MacOS :confused:
I see. Looks like printf
in MacOS does not support \xXX
format to hex value. I will use octal number instead. This should be unix compatible.
The
PtyProcessUnicode
class accept keywords argument likeencoding
andcodec_errors
. However, it seems not easy to set these argument just usingPtyProcess.spawn
.I think we could add a
**kwargs
tospawn
and create the class instance usingcls(pid, fd, **kwargs)
. It will be neat and improve extensibility.