Needs Python 3 and has no dependencies.
Run
python3 pyfileconsole.py
in one terminal and
python3 client.py
in another one. Then type in the client. For example,
x = 3
eval x + 1
The files are too short for command-line parameters. If you want to change something (even the names of the two files used), just edit the scripts. This includes adding command-line paramters for your own usecase.