I am coding a data entry system in Python, in which the user should also be able to submit 'commands', exactly like the Python shell works, or for example SAS or R interfaces. I would like to know how to code a shell. For examnple, it should provide a prompt (which cannot be deleted by the user, e.g. the >>> prompt in Python) and receive input from the user. Furthermore, once an entry is submitted, the user cannot go back, like in the DOS prompt, where you cannot go up a line, so to speak.
Can anybody help with this?