Creating a shell command line application with Python and Click

前端 未结 4 1155
野的像风
野的像风 2021-02-06 00:48

I\'m using click (http://click.pocoo.org/3/) to create a command line application, but I don\'t know how to create a shell for this application.
Suppose I\'m writing a progr

4条回答
  •  余生分开走
    2021-02-06 00:57

    I was trying to do something similar to the OP, but with additional options / nested sub-sub-commands. The first answer using the builtin cmd module did not work in my case; maybe with some more fiddling.. But I did just run across click-shell. Haven't had a chance to test it extensively, but so far, it seems to work exactly as expected.

提交回复
热议问题