This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description


This project is abandoned and unsupported. Use argparse or docopt instead.


cmdstyle is a library for creating command line interfaces using the command style used by programs like svn or hg.


Sample File:

#! /usr/bin/env python3.2

import sys

import cmdstyle

class HelloCommand(cmdstyle.Command):
    'Print a greeting'

    name = cmdstyle.PosParam()
    shout = cmdstyle.Flag(
        description='Print the greeting in upper case',
    exclamations = cmdstyle.Option(
        description='The number of exclamation marks used to end the '

    def __call__(self):
        #Note that the library does not do validations
        exclamations_int = int(self.exclamations)

        greeting = 'Hello'
            greeting += ', ' +
        if self.shout:
            greeting = greeting.upper()
        greeting += exclamations_int * '!'


class ByeCommand(cmdstyle.Command):
    'Print bye'

    def __call__(self):

program = cmdstyle.Program(
    'Sample Program',
    'Just a sample program',


if __name__ == '__main__':

Sample Being Used:

$ ./
Use ` help` for usage.

$ ./ help
usage: <command> [options] [args]

Sample Program
Just a sample program

Available commands:

Use ` help <command>` for help on a specific command.
See http://... for additional information.

$ ./ help hello
hello: Print a greeting
usage: hello NAME

   --shout             Print the greeting in upper case
-e --exclamations ARG  The number of exclamation marks used to end the greeting

$ ./ hello

$ ./ hello --shout --exclamations 3
Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
cmdstyle-0.1.0.tar.gz (10.2 kB) Copy SHA256 Checksum SHA256 Source Nov 9, 2011

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting