Now that I have readline working with jython, I come quickly to the next hurdle.  Is it possible to integrate readline capabilities into jython-coded command interpreters based on cmd.Cmd?  I cannot get this to work at all.  The docs on cmd.Cmd gave me some hope, but I can't get any of it to work, not even the Ctrl-P, Ctrl-N stuff.  I also tried setting use_rawinput to 0 to force readline, that produced an error when I executed cmdloop():

TypeError: write(): 1st arg can't be coerced to String

Does anyone have any ideas how readline can be made to work in cmd.Cmd interpreters?