Permalink
Browse files

Add xml2cython option to get version.

  • Loading branch information...
1 parent 6b54056 commit 91eb772aca287f6f24704706ab41fc760c248568 @cournape committed Dec 1, 2008
Showing with 6 additions and 2 deletions.
  1. +6 −2 scripts/xml2cython.py
View
8 scripts/xml2cython.py
@@ -25,6 +25,7 @@
except ImportError:
from StringIO import StringIO
+import cycodegenlib
from cycodegenlib.tp_puller import TypePuller
from cycodegenlib.misc import classify, query_items
from cycodegenlib.cycodegen import generate_cython
@@ -76,10 +77,10 @@ def main(argv=None):
# parse command line options
try:
try:
- opts, args = getopt.getopt(argv[1:], "ho:l:f:i:",
+ opts, args = getopt.getopt(argv[1:], "ho:l:f:i:V",
["help", "output", "location-filter",
"function-name-filter",
- "input-file-filter"])
+ "input-file-filter", "--version"])
except getopt.error, msg:
raise Usage(msg)
except Usage, e:
@@ -104,6 +105,9 @@ def main(argv=None):
ffilter_str = a
elif o in ("-i", "--input-file-filter"):
ifilter = a
+ elif o in ("-V", "--version"):
+ print "xml2cython: use cycodegenlib version", cycodegenlib.version
+ return 0
if len(args) != 2:
print >>sys.stderr, "Error, exactly one input file must be specified"

0 comments on commit 91eb772

Please sign in to comment.