How to make a command line interface or interpreter in Python

后端 未结 4 1142
清酒与你
清酒与你 2021-01-12 16:24

I have already developed class1.py, class2.py, etc. with functions implemented inside each class. e.g. Operator.py has add, minus, time, divide functions. How can I build a

4条回答
  •  情歌与酒
    2021-01-12 17:12

    Use the cmd module:

    • Reference : Custom (interactive) shell with Python

    Other packages

    You can also use various modules hosted at pypi that is built on top of cmd module

    • http://pypi.python.org/pypi/Custom%20Interactive%20Console/1.0

提交回复
热议问题