From: <bc...@wo...> - 2002-01-05 13:40:23
|
[Steve Cohen] >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():=20 > >TypeError: write(): 1st arg can't be coerced to String Was there a stacktrace with that exception? It is not uncommon that TypeErrors are caused by a too restrictive method signature in the jython core, but more information is needed. Also try to start jython with the command: jython -Dpython.options.showJavaExceptions=true to get additional stacktrace information. >Does anyone have any ideas how readline can be made to work in cmd.Cmd >interpreters? I doubt that it works at the moment. raw_input() just call the .readline() method on sys.stdin. Someone have to add support for readline in __builtin__.raw_input(). Anyone? regards, finn |