Files
opm-common/opm/parser/eclipse/python/test.py
Joakim Hove 3a426cb4c9 Added simple python wrapper for Parser and Deck.
- Create a new shared library libcopmparser with small files cxxxx
   which wrap general Cxx classes with C linkage.

 - Added Python packages & modules, based on Python ctypes and the
   ert.cwrap package.
2016-01-15 16:35:09 +01:00

13 lines
317 B
Python
Executable File

#!/usr/bin/env python
import sys
sys.path += ["/private/joaho/work/OPM/opm-parser/opm/parser/eclipse/python/python"]
from opm.parser.parser import Parser
p = Parser()
deck = p.parseFile( sys.argv[1] )
print "Number of keywords in deck: %s" % len(deck)
for kw in deck:
print "%s:%d" % (kw.name() , len(kw))