I am turning mad with the following code :
methods = {
'pageFunctionNewPage': myClassInstance.pageFunctionNewPage,
}
sf = 'NewPage,1,0'
functionName1 = 'PageFunction' + sf.split(',')[0]
functionName2 = 'pageFunctionNewPage'
print functionName1
print functionName2
methods[functionName1]()
methods[functionName2]()
The two prints are same on screen. The second call works well while the first one always send an error message
KeyError: 'PageFunctionNewPage'
Really cannot see what I do wrong ! Tks for pointing the mistake.