Your code should like below :
Code:
import appuifw
# define the list of items (put a u in front - items must be written in unicode!)
L = [u"cakewalk", u"com-port", u"computer", u"bluetooth", u"mobile", u"screen", u"keys"]
# create the selection list
index = appuifw.selection_list(choices=L , search_field=1)
# use the result of the selection to trigger some action (here we just print something)
if index = o:
appuifw.note("cakewalk was selected","info")
else:
appuifw.note("thanks for choosing","info")
Try the above code I have modified.
Best regards,