In my continued work on a COM automation interface for IE I've encountered a strange/impossible Python behavior. Here's what appears to be the offending code:
----- code ----- nodes = self.DomGetNListFilterValue(node, tags, properties, value, intoFrames, errorFlag, message) print 'DomGetANodeFilterValue', nodes #DomGetANodeFilterValue [<win32com.gen_py.Microsoft HTML Object Library.DispHTMLInputElement instance at 0x34839088>] print 'DomGetANodeFilterValue', len(nodes) #DomGetANodeFilterValue 1 print 'DomGetANodeFilterValue[%s]'%nodes[0] #DomGetANodeFilterValue[] if len(nodes) == 1: print 'DomGetANodeFilterValue[%s]'%(nodes[0]) #DomGetANodeFilterValue[] #but under debugger, #nodes[0] #<win32com.gen_py.Microsoft HTML Object Library.DispHTMLInputElement instance at 0x34839088> return nodes[0] ----- end code ----- The call to DomGetNListFilterValue returns a list with 1 object per the print statements (the comments contain the print statements output). But an attempt to reference the object returns nothing per the following print statement. Curiously, setting a break point and referencing nodes[0] DOES return the correct value!?! I've never seen this kind of behavior. Does anyone have any clues? Thanks for any help. Regards, Richard _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32