add the dialog python code