+ found string splitting bug
[qpalma.git] / ParaParser / simple_example.py
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3
4 import sys
5 from ParaParser import *
6
7 def run(file):
8 parser = ParaParser("%d%s%s%d%d",["field0","field1","field2","field3","field4"],5)
9 parser.parseFile(file)
10 print "After parseFile call..."
11 entry1_dict = parser.fetchEntry(1111)
12 print "Fetching entry..."
13 print entry1_dict
14 entry2_dict = parser.fetchEntry(2222)
15 print entry2_dict
16
17 if __name__ == '__main__':
18 run('test.data')