A Unique XML Parsing Problem

2010-10-23 Thread Devon
I must quickly and efficiently parse some data contained in multiple
XML files in order to perform some learning algorithms on the data.
Info:

I have thousands of files, each file corresponds to a single song.
Each XML file contains information extracted from the song (called
features). Examples include tempo, time signature, pitch classes, etc.
An example from the beginning of one of these files looks like:











-60.000
-59.897


0.589
0.446
0.518
1.000
0.850
0.414
0.326
0.304
0.415
0.566
0.353
0.350

I am a statistician and therefore used to data being stored in CSV-
like files, with each row being a datapoint, and each column being a
feature. I would like to parse the data out of these XML files and
write them out into a CSV file. Any help would be greatly appreciated.
Mostly I am looking for a point in the right direction. I have heard
about Beautiful Soup but never used it. I am currently reading Dive
Into Python's chapters on HTML and XML parsing. And I am also more
concerned about how to use the tags in the XML files to build feature
names so I do not have to hard code them. For example, the first
feature given by the above code would be "track duration" with a value
of 29.12331

Thanks,

-Devon
-- 
http://mail.python.org/mailman/listinfo/python-list


Tetris

2006-06-18 Thread Devon G. Parks
I've been searching google and this group for a while now for a good
tutorial on making a Tetris-style game in Python. I hear Tetris is a
good starting point, and although I am fairly new to programming I
think I would learn best if I had some code to experiment with because
without a tutorial I have no idea where to start. If you know of a
tutorial that is specific to this game please let me know where to find
it.

-- 
http://mail.python.org/mailman/listinfo/python-list