Python cmd2 module send commands -


i have implemented custom command line python cmd2 module.

from cmd2 import cmd class cliapp(cmd):       ..... 

now need send commands custom command line other python project. tried:

send = cliapp().send print send('hello') 

which gives error:

attributeerror: cmd instance has no attribute 'send'

i have tried original example from:

cmd2 - the-send-method - gives same error.

the python cmd2 module developed catherine devlin around 2008 , has project page on github under python-cmd2/cmd2 appears separate entity cmd2 module developed around same time frame michele simionato.

you can read documentation cmd2 module can install pypi @ cmd2.rtfd.io , note not have send method.

to accomplish want, suggest looking @ cmd2 source code onecmd_plus_hooks method , @ cmd2 unit tests call method via run_cmd helper in conftest.py.


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -