In another thread you contributed to, this was suggested:
which looks a bit different to what you're saying is now no longer working. Maybe that's the answer? I know nothing about using python together with KM so excuse me if I'm on the wrong track - just trying to be helpful!
For more information, see the wiki Searching the Forum for Answers section.