From: Raghuram D. <ra...@sy...> - 2006-06-08 21:16:10
|
Hi, After searching the web for jython command-line history support (on unix), I found couple of pointers but I needed to use both of them in some sense to get things to work. I am posting the steps I followed here in the hope that someone may find it useful. It may even be added to the FAQ. These are tested on Linux with jython 22. 1) download Java Readline library from http://sourceforge.net/projects/java-readline. (I tested with version 0.8). You can download rpm or source files. It is very easy to build from source. A top level Makefile is provided. Ultimately, two files are required: *) libreadline-java.jar *) libJavaReadline.so 2) Make sure that these are accessible to jython. There are several ways to achieve it. I did it as follows: *) add <path-to-libreadline-java.jar> to "java -cp" argument in jython startup script. *) add <directory-containing-libJavaReadline.so> to LD_LIBRARY_PATH, again, in jython startup script. 3) edit the jython registry to have the following settings: python.console=org.python.util.ReadlineConsole python.console.readlinelib=GnuReadline Thanks to all those who made this possible, Raghu. |