examples in help
authorAlexander Solovyov <piranha@piranha.org.ua>
Thu, 02 Jul 2009 21:36:50 +0300
changeset 27 3908a489c02e
parent 26 42f2917b59ec
child 28 1a90a706e10d
examples in help
README
--- a/README	Thu Jul 02 21:36:40 2009 +0300
+++ b/README	Thu Jul 02 21:36:50 2009 +0300
@@ -39,7 +39,12 @@
 
 Usage is easy like that::
 
-    write example here
+    from fancycmd import fancyopts
+    def main(dirname, **opts):
+        '''write some help here'''
+        pass
+    parser = fancyopts(main, opts, usage='%s [-l HOST] DIR' % sys.argv[0])
+    parser(sys.argv[1:])
 
 Subcommands
 -----------