try: self.txtbox = self.getControl(9922) # Example of getting a control based on ID self.txtbox.setText("hello") except TypeError: print "AISHGIUASGHISAHG" traceback.print_exc()