Python module readline for command history

###
Python module readline for command history

The Python interpreter launched from SIC provides the command line history if and only if the Python module readline is imported. This is done automatically when the interpreter is launched. If this module can not be imported, an ImportError will be raised and you will not have the command history at the Python prompt.

The readline module is a Python builtin module. In most case it has been compiled and installed during your Python installation. Nevertheless, in case of a new compilation and installation of Python, it may not be available. You can check this by trying to import it in a standard Python session:

    >>> import readline

If an ImportError raises, here is what you (or your system administrator) have to do. The basic idea is that the readline Python module is compiled from a readline.c in Python source. Your system must provide the libraries libreadline.a and libtermcap.a to compile it successfully.

1. Check the config.log file (the output of the ./configure command) in the directory used to compile Python. Search for readline occurences and look for errors that did not allow to find readline on your system.
2. It may appear that some symbols where undefined. They are provided by the two system libraries libreadline.a and libtermcap.a. Check if you have them, install them if not. Launch ./configure command again.
3. If the readline Python module still not compiles, try fo force ./configure to link against one or two of the above system libraries:

       ./configure --with-libs='-ltermcap'

   The module should now compile. make and make install your Python with its new module.