'Set up history if readline is available'

@classmethod
def initReadline(cls):

    if cls.readlineInited:
        return
    cls.readlineInited = True
    try:
        from readline import read_history_file, write_history_file, set_history_length
    except ImportError:
        pass
    else:
        history_path = os.path.expanduser('~/.mininet_history')
        if os.path.isfile(history_path):
            read_history_file(history_path)
            set_history_length(1000)
        atexit.register((lambda : write_history_file(history_path)))
