ich habe ein Problem und da ich recht neu auf dem Python-Gebiet bin, versuche ich jetzt nicht noch zwei Tage damit zu verbringen eine Lösung zu finden, sondern hoffe einfach mal auf Input von "Außen".
Es geht um folgende (kleine) Funktion:
Code: Alles auswählen
def do_next():
artists = ['Bryan Adams', 'Leona Lewis']
posX = 100
posY = 350
xmlStart = ['<?xml version="1.0" encoding="UTF-8"?><MTWidget>']
for artistName in artists:
xmlStart.append('<MTLabel label="'+str(artistName)+'"/>')
posX += 150
xmlStart.append('</MTWidget>')
for xmlCode in xmlStart:
print "%s" %(xmlCode)
xmlString = xmlCode
tmpArt = XMLWidget(xml=xmlString)
window.add_widget(tmpArt)
anim = Animation(duration=0.5, x=posX, y=posY, f="ease_in_bounce")
tmpArt.do(anim)
Das ganze mag ein Wenig wirr aussehen, weil ich jetzt schon 100 verschiedene Möglichkeiten getestet habe - ohne Erfolg.
Wie gesagt: Vieles probiert, aber immer die gleichen Ergebnisse.
Ich hoffe ihr könnt mir helfen.
Danke im schonmal im Voraus
Grüße karllson