import IfxPy ConStr = "SERVER=gc-server6;DATABASE=csdb;HOST=192.168.2.46;SERVICE=9088;UID=informix;PWD=Gcbs12ma;" conn = IfxPy.connect(ConStr, "", "") sql = "SELECT cmid, objid FROM cmobjprops1 WHERE objid IN ('::Everyone', '::System Administrators') OR objid LIKE 'CognosEx:%'" stmt = IfxPy.exec_immediate(conn, sql) dictionary = IfxPy.fetch_both(stmt) rc = 0 while dictionary != False: rc += 1 print("-- Record {0} --".format(rc)) print("c1 is : ", dictionary[0]) print("c2 is : ", dictionary[1]) print("c3 is : ", dictionary["c3"]) print("c4 is : ", dictionary[3]) print(" ") dictionary = IfxPy.fetch_both(stmt) IfxPy.close(conn)