here is python program that produces a list of drives and adds buttons accordingly,
drives = win32api.GetLogicalDriveStrings()
drives = (drives.split('\000')[:-1])
for d in range(0,len(drives)):
box.add_widget(Button(text=drives[d],on_press = lambda x: self.open_drive(s=drives[0+d])))
self.add_widget(box)
def open_drive(self,s):
print(str(s))
when ever I click the button it is supposed to print C: D: E: and so on, but it is stuck on last drive in the list, how do i store the parameter in that lambda function?