Let me preface this by saying: I'm a neophyte to Pyhon! I've written a bunch of modules to drive a user interactive application via the command line. Additionally, someone recommended that I look at using the cmd module. And I've looked at it on some sites, but still not sure how to use it. I don't have dyslexia or anything like that, but I have a really tough time digesting technical literature (with no examples) ... I'm a visual learner, and if I can see a good, clear example one time, it's with me for a life time. Can anyone give me a short intro on how to use the cmd module ...? Until then, I will continue to scour Google for good examples. I might get lucky ... Thanks!
Doug Hellmann's Python Module of the Week series has a good example of using the cmd
module.
Another good example is the ActiveState recipe "Console built with Cmd object", but I think it is more complicated. ActiveState Python recipes and PyMOTW are good sources for python examples.
You could also see the cmd
module's source to understand how it works, and you may like the cmd2
module too.
There was a very nice presentation by Catherine Devlin at last years PyCon about getting started with cmd and cmd2.
Video can be found on pyvideo.
Video, code and slides used to be on the Pycon website but that link is now dead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With