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

How to check data type in C++? -

javascript - Is getTimezoneOffset() stable during daylight saving transition? -

sql server - SQL Query returns one result, does not return 0 or NULL result -