fix help output
authorAlexander Solovyov <piranha@piranha.org.ua>
Sun, 24 Jan 2010 11:05:51 +0200
changeset 99 a77c4a82e836
parent 98 f215aef1d1ee
child 100 78a1e77609e6
fix help output
opster.py
tests/test.out
tests/test_cmd.out
tests/test_opts.out
--- a/opster.py	Sun Jan 10 23:05:37 2010 +0200
+++ b/opster.py	Sun Jan 24 11:05:51 2010 +0200
@@ -224,7 +224,7 @@
     doc = func.__doc__
     if not doc:
         doc = '(no help text available)'
-    write(doc.strip() + '\n')
+    write('\n' + doc.strip() + '\n\n')
     if options:
         write(''.join(help_options(options)))
 
--- a/tests/test.out	Sun Jan 10 23:05:37 2010 +0200
+++ b/tests/test.out	Sun Jan 24 11:05:51 2010 +0200
@@ -5,9 +5,11 @@
  simple  Just simple command to do nothing.
 ['test', 'ui']
 test.py complex [-p] [--exit value] ...
+
 That's more complex command indented to do something
 
     Let's try to do that (what?!)
+
 options:
 
  -p --pass     don't run the command
--- a/tests/test_cmd.out	Sun Jan 10 23:05:37 2010 +0200
+++ b/tests/test_cmd.out	Sun Jan 24 11:05:51 2010 +0200
@@ -6,7 +6,9 @@
  initdb     Initialize database
  runserver  Run development server
 test_cmd.py runserver [OPTIONS] 
+
 Run development server
+
 options:
 
  -l --listen  ip to listen on (default: localhost)
--- a/tests/test_opts.out	Sun Jan 10 23:05:37 2010 +0200
+++ b/tests/test_opts.out	Sun Jan 24 11:05:51 2010 +0200
@@ -1,7 +1,9 @@
 test_opts.py [-l HOST] DIR
+
 Command with option declaration as keyword arguments
 
     Otherwise it's the same as previous command
+
 options:
 
  -l --listen     ip to listen on (default: localhost)
@@ -10,9 +12,11 @@
     --pid-file   name of file to write process ID to
  -h --help       show help
 test_opts.py [-l HOST] DIR
+
 Command with option declaration as keyword arguments
 
     Otherwise it's the same as previous command
+
 options:
 
  -l --listen     ip to listen on (default: localhost)