diff options
Diffstat (limited to 'components/rtgui/utils/perfect_hash/example-C++/mk_header.py')
| -rw-r--r-- | components/rtgui/utils/perfect_hash/example-C++/mk_header.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/components/rtgui/utils/perfect_hash/example-C++/mk_header.py b/components/rtgui/utils/perfect_hash/example-C++/mk_header.py new file mode 100644 index 0000000000..646c0787be --- /dev/null +++ b/components/rtgui/utils/perfect_hash/example-C++/mk_header.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python + +for line in file('states.dat'): + line = line.strip() + if line.startswith('#'): + continue + + row = tuple(entry.strip() for entry in line.split('|')) + + print ' { "%s", "%s", %s },' % row |
