Hi friends,
Perhaps someone can help with this problem.
SQL
SELECTION = " "
def main(session, **kwargs):
res = openTest(session)
print "res =", res
def openTest(session):
session.openWithCallback(test1, ChoiceBox, title="Select playlist item?", list=[(_("yes"), "yes"), (_("no"), "no"), (_("perhaps"), "perhaps"), (_("ask me tomorrow"), "ask me tomorrow"), (_("leave me alone with this!"), "yes")])
return SELECTION
def test1(answer):
print "answer A:", answer
global SELECTION
SELECTION = answer[1]
Alles anzeigen
Question :- This code prints res = None. Without changing def main - how can the correct reply 'res' be printed ?
Can 'timer' be used somehow in openTest to delay print "res =", res ?
Regards, pcd.