I have the following lisp file, which is from the UCI machine learning database. I would like to convert it into a flat text file using python. A typical line looks like this:
(1 ((st 8) (pitch 67) (dur 4) (keysig 1) (timesig 12) (fermata 0))((st 12) (pitch 67) (dur 8) (keysig 1) (timesig 12) (fermata 0)))
I would like to parse this into a text file like:
time pitch duration keysig timesig fermata
8 67 4 1 12 0
12 67 8 1 12 0
Is there a python module to intelligently parse this? This is my first time seeing lisp.