Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

This is a helper module for making intuitive command line programs with
zero effort. It takes a function signature like:
example_function(string1, string2='something', string3='something else')
and turns it into a simple command-line app with usage:
example_program string1 [string2 [string3]]

All you have to do is:
if __name__ == "__main__":
import commandline
commandline.run_as_main(example_function)

Limitations
============

Note that it currently can't print help information for arguments other than their default values,
but it will print your docstring for you if that's of any use.
Help for arguments will probably come with python3000's function annotations.
http://www.python.org/dev/peps/pep-3107/

Argument types are inferred from the default arguments. Currently supported are:
int, float, bool, str, commandline.Choice
If things don't have a default argument, I can't infer the type, so assume str.

Download files

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

Source Distribution

commandline-0.1.3dev.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

commandline-0.1.3dev-py2.6.egg (13.8 kB view details)

Uploaded Egg

File details

Details for the file commandline-0.1.3dev.tar.gz.

File metadata

File hashes

Hashes for commandline-0.1.3dev.tar.gz
Algorithm Hash digest
SHA256 5880a51f10fc82e424fcd16fc5a97c5aedaa710237c2c4508b219d4fb7035f96
MD5 09b87e139794f9d94fc4cf0d13337c48
BLAKE2b-256 8bfdac7a27d7f88d3de78d7a2aede15c2fa1dd6ce1be9ddac799263cbb4f85d9

See more details on using hashes here.

File details

Details for the file commandline-0.1.3dev-py2.6.egg.

File metadata

File hashes

Hashes for commandline-0.1.3dev-py2.6.egg
Algorithm Hash digest
SHA256 c63848a69c7d4c4b4fc0b4a030fa62cf0256962922966e52fa970228f4d75319
MD5 675720fc99ee631d4a595d6d0ff8d73f
BLAKE2b-256 cee767722c4f224fab111d225a6ac546fcf5cb35b17d1182eebfc605a134b6c8

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.3dev This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page