-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
Hi, I've just written a new readConfig function to correctly parse the es_systems.cfg file, now in XML format.
Just replace the function readConfig with this:
def readConfig(file):
systems=[]
config = ET.parse(file)
configroot = config.getroot()
for child in configroot:
name = child.find('name').text
path = child.find('path').text
ext = child.find('extension').text
pid = child.find('platformid').text
if not pid:
continue
else:
system=(name,path,ext,pid)
systems.append(system)
print name, path, ext, pid
return systemsNote: you need to add the subnode in all the nodes, like this:
<system>
<fullname>Nintendo Entertainment System</fullname>
<name>nes</name>
<path>/media/usb/roms/nes</path>
<extension>.nes .NES</extension>
<command>..... </command>
<platform>nes</platform>
<platformid>7</platformid>
<theme>nes</theme>
</system>
Metadata
Metadata
Assignees
Labels
No labels