I'm using the VLC python bindings found here -> http://wiki.videolan.org/Python_bindings

I've also been reading over the excellent API documentation found here -> http://liris.cnrs.fr/advene//download/python-ctypes/doc/

The thing that is currently escaping me though - how do I have an event fire when a song ends? I'm assuming it has to do with EventType.MediaPlayerEndReached - but could anyone out there provide a small example on how to utilize this event? The proper syntax escapes me.

For reference a small bit of code I am trying that is failing:

>>> mymedia = MediaList()
>>> mymedia.add_media("/path/to/mediafile1")
>>> mymedia.add_media("/path/to/mediafile2")
>>> player = MediaListPlayer()
>>> player.set_media_list(mymedia)
>>> pevent = player.event_manager()
>>> def event_cb( ev ):
	print "Hey look an event..."
>>> pevent.event_attach(EventType().MediaPlayerMediaChanged, event_cb)
When I tell my player to play the media comes up just fine - but the event doesn't fire when I change tracks. I'm assuming it has to do with the returning -1 from the event_attach - what am I doing wrong?