Bisher mache ich das so:
Code: Alles auswählen
popup.add_command(label = "List", command = listDir )
Code: Alles auswählen
popup.add_command(label = "List", command = listDir("MeinTollesDir") )
Geht das? Unter perl wars recht simpel.
Code: Alles auswählen
popup.add_command(label = "List", command = listDir )
Code: Alles auswählen
popup.add_command(label = "List", command = listDir("MeinTollesDir") )
Code: Alles auswählen
popup.add_command(label="List", command=lambda: listDir("MeinTollesDir"))
Code: Alles auswählen
for id in range(1,10,1):
popup.add_command(label="List", command=lambda: listDir(id))
Code: Alles auswählen
for id in range(1,10,1):
popup.add_command(label="List", command=lambda id=id: listDir(id))