tests/test_cmd.py
author Anton Dutov <anton@dutov.org>
Mon, 09 Nov 2009 23:31:37 +0200
changeset 97 46afc08b68ff
parent 96 82aaeccffbec
permissions -rw-r--r--
various py3k incompatibilities removed

#!/usr/bin/env python

import opster

config_opts=[('c', 'config', 'webshops.ini', 'config file to use')]

@opster.command(config_opts)
def initdb(config):
    """Initialize database"""
    pass

@opster.command(config_opts)
def runserver(listen=('l', 'localhost', 'ip to listen on'),
              port=('p', 5000, 'port to listen on'),
              **opts):
    """Run development server"""
    print locals()

if __name__ == '__main__':
    opster.dispatch()