Skip to main content

Cmdpy is a library to take the rote scutwork out of writing commandline tools in python

Project description


The idea behind 'cmdpy' is to make it easy to make multi-command scripts by abstracting out all the dispatch machinery and commandline parsing.

cmdpy can be used either from the commandline:

cmdpy mycmdpy command

or as a #! line in a python script (mycmdpy above)

By default it thinks that all attributes that start with 'cmd_' are commands you want exposed. The 'command prefix' is settable by setting a top-level variable named 'command_prefix' to whatever you want.

right now 'echopy' is the example program

TODO:

* better example
* some tests would be good
* figure out how to delete mycmdpypyc that imp creates

Project details


Release history Release notifications

This version
History Node

1.4

History Node

1.3

History Node

1.2

History Node

1.1

History Node

1.0

History Node

0.0.1-

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
cmdpy-1.4-py27-none-any.whl (9.1 kB) Copy SHA256 hash SHA256 Wheel 2.7 Jan 16, 2014
cmdpy-1.4.tar.bz2 (7.6 kB) Copy SHA256 hash SHA256 Source None Jan 16, 2014
cmdpy-1.4.tar.gz (7.9 kB) Copy SHA256 hash SHA256 Source None Jan 16, 2014
cmdpy-1.4.zip (10.0 kB) Copy SHA256 hash SHA256 Source None Jan 16, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page