Note that the variant of getComponent() that takes an integer will not deliver a component that is wrapped for full functionality in jython unless you have installed my Simulation Aids 3rd-party module. See this topic for the intricate details:
getComponent()