Skip to content

pjz/cmdpy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

a wrapper for python code to make it more easily callable from the commandline

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages