Correct way to create a shell like environment in python?
- by Wilduck
I'm trying to create a shell like environment, where a user is presented with "" and can type in any of a number of pre-defined commands. However, the only way I can think of implementing this is with a dictionary mapping commands-code and python's "exec".
Is there a more correct way of doing this?