I am trying to use Python in SPSS custom dialog.
My question is how to capture the input value(s) from the UI of the SPSS custom dialog into a variable in Python?
I've tried something like var_python=%%thisvalue%%
but this returns an error.
Thanks a lot for your help.
Cheers,
You have to add quotation marks. Also don't forget to add BEGIN PROGRAM and END PROGRAM command.
e.g.:
BEGIN PROGRAM PYTHON.
this="%%item_294%%"
print this
END PROGRAM.