support -h/--help in cmd line utility
authorStefan Behnel <scoder@users.berlios.de>
Thu, 30 Dec 2010 07:44:24 +0000 (08:44 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Thu, 30 Dec 2010 07:44:24 +0000 (08:44 +0100)
Cython/Compiler/CmdLine.py

index d7e5fb6ef20712d0bd69ee90cbc28d49a7c6e889..eaf1b908cb84b2e7db4135149749c877f8a023be 100644 (file)
@@ -143,6 +143,9 @@ def parse_command_line(args):
                 else:
                     sys.stderr.write("Unknown debug flag: %s\n" % option)
                     bad_usage()
+            elif option in ('-h', '--help'):
+                sys.stdout.write(usage)
+                sys.exit(0)
             else:
                 sys.stderr.write("Unknown compiler flag: %s\n" % option)
                 sys.exit(1)