I am trying to build Python interactive console app that should work on Windows and Linux. I want it to be able to autocomplete commands using tab. It seams like cmd is a good tool for this purpose but it uses readline, which is available only under Linux. Reading related questions I found out that there is a Windows alternative to readline - pyreadline. But its documentation says that it is only tested under Windows, which means it is not suitable for Linux. And I cannot really figure out how to make cmd work with pyreadline anyway.
An example of what I am trying to accomplish: Commands: test, read, write. When user writes t and presses tab the command should be completed to test.
The app should also be compatible with Python 2.7 and Python 3.
Please let me know is you have any thoughts on this!