Python Ppg Logic Problem

Hi,

I have created PPG Objects in Jscript for XSI, I am now trying to make the same PPG Object in Python.

jscript:
oPPGLayout.Logic = CreateHandControls_OnClicked.toString()
oPPGLayout.Language = "JScript" ;

what is the equivalent for Python?? here is what I have:

 oPPGLayout.Logic = str("CreateHandControls\_OnClicked")
 oPPGLayout.Language = "Python" ;

The whole UI still pops up but i get the error below, saying my function is not defined.

Any suggestions will be greatly appreciated.
Thank you

# ERROR : Traceback (most recent call last):
# File "", line 1, in
# CreateHandControls_OnClicked
# NameError: name 'CreateHandControls_OnClicked' is not defined
# - [line 1]
# ERROR : Property Page Script Logic Error (Python ActiveX Scripting Engine)
# ERROR : >[1] CreateHandControls_OnClicked
# ERROR : Traceback (most recent call last):
# File "", line 1, in
# CreateHandControls_OnClicked
# NameError: name 'CreateHandControls_OnClicked' is not defined

Is your CreateHandControls_OnClicked function before this 2 lines ?