--- a/test_cmd.py Fri Sep 11 22:50:51 2009 +0300
+++ b/test_cmd.py Sat Sep 12 08:54:47 2009 +0300
@@ -4,22 +4,17 @@
config_opts=[('c', 'config', 'webshops.ini', 'config file to use')]
-
@opster.command(config_opts)
def initdb(config):
"""Initialize database"""
pass
-
-@opster.command(options=config_opts + [
- ('h', 'host', 'localhost', 'The host for the application.'),
- ('p', 'port', 5000, 'The port for the server.'),
- ('', 'nolint', False, 'Do not use LintMiddleware')
-])
-def runserver(**opts):
+@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 opts
-
+ print locals()
if __name__ == '__main__':
opster.dispatch()