From skippy.hammond at gmail.com Mon Oct 1 03:41:15 2012 From: skippy.hammond at gmail.com (Mark Hammond) Date: Mon, 01 Oct 2012 11:41:15 +1000 Subject: [python-win32] info on _GetInterfaceCount In-Reply-To: <50659B50.7080801@boscolini.eu> References: <5064EDB8.90509@gmail.com> <50659B50.7080801@boscolini.eu> Message-ID: <5068F4BB.4030301@gmail.com> On 28/09/2012 10:42 PM, Matteo Boscolo wrote: > this is the log of part of my application > > DEBUG:root:__DEL__ > DEBUG:root:pythoncom._GetInterfaceCount(): 4 > DEBUG:root:pythoncom._GetGatewayCount(): 0| > DEBUG:Root:pythoncom.CoUninitialize()| > DEBUG:root:pythoncom._GetInterfaceCount(): 4 > DEBUG:root:pythoncom._GetGatewayCount(): 0 > > as you can see the GetInterfaceCount is still at 4 .. > there is a way to know witch object are the 4 that came from the > GetInterfaceCount ? Not directly - only a simple counter is tracked, not a list of what the objects are. If you are lucky, you might be able to use the 'gc' module to locate all live objects and see what you can find alive that "looks" like a COM object (but even that probably will not tell you where the reference actually lives) Mark > > regards, > matteo > > > > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > http://mail.python.org/mailman/listinfo/python-win32 > From matteo.boscolo at boscolini.eu Tue Oct 2 00:21:33 2012 From: matteo.boscolo at boscolini.eu (Matteo Boscolo) Date: Tue, 02 Oct 2012 00:21:33 +0200 Subject: [python-win32] info on _GetInterfaceCount In-Reply-To: <5068F4BB.4030301@gmail.com> References: <5064EDB8.90509@gmail.com> <50659B50.7080801@boscolini.eu> <5068F4BB.4030301@gmail.com> Message-ID: <506A176D.1010507@boscolini.eu> I'm going on with my stydy, inspecting the gc.. the only object that seems very satrange is listed below. ITDPropClass its the com object of the com application there is somone that can tell me if i'm on the right way? dose _vtables_ have a particular mening? regards, Matteo 42760064 {'ITDPropClass_vtables_': [((u'Name', u'pVal'), 10, (10, (), [(16392, 10, None, None)], 1, 2, 4, 0, 60, (3, 0, None, None), 0)), ((u'SetValue', u'typeValue', u'maxElValue'), 11, (11, (), [(12, 1, None, None), (3, 1, None, None)], 1, 1, 4, 0, 64, (3, 0, None, None), 0)), ((u'GetValue', u'typeValue', u'maxElValue'), 12, (12, (), [(16396, 2, None, None), (16387, 2, None, None)], 1, 1, 4, 0, 68, (3, 0, None, None), 0)), ((u'Description', u'pVal'), 13, (13, (), [(16392, 10, None, None)], 1, 2, 4, 0, 72, (3, 0, None, None), 0)), ((u'Description', u'pVal'), 13, (13, (), [(8, 1, None, None)], 1, 4, 4, 0, 76, (3, 0, None, None), 0)), ((u'UsedBy', u'pVal'), 14, (14, (), [(24585, 10, None, "IID('{D344208D-C991-11D3-BDD6-00500400405B}')")], 1, 2, 4, 0, 80, (3, 0, None, None), 0)), ((u'ClassReadable', u'pVal'), 15, (15, (), [(16395, 10, None, None)], 1, 2, 4, 0, 84, (3, 0, None, None), 0)), ((u'ClassReadable', u'pVal'), 15, (15, (), [(11, 1, None, None)], 1, 4, 4, 0, 88, (3, 0, None, None), 0)), ((u'ClassWritable', u'pVal'), 16, (16, (), [(16395, 10, None, None)], 1, 2, 4, 0, 92, (3, 0, None, None), 0)), ((u'ClassWritable', u'pVal'), 16, (16, (), [(11, 1, None, None)], 1, 4, 4, 0, 96, (3, 0, None, None), 0)), ((u'ClassDeletable', u'pVal'), 17, (17, (), [(16395, 10, None, None)], 1, 2, 4, 0, 100, (3, 0, None, None), 0)), ((u'ClassDeletable', u'pVal'), 17, (17, (), [(11, 1, None, None)], 1, 4, 4, 0, 104, (3, 0, None, None), 0)), ((u'PropertyInheritance', u'pVal'), 18, (18, (), [(16395, 10, None, None)], 1, 2, 4, 0, 108, (3, 0, None, None), 0)), ((u'PropertyInheritance', u'pVal'), 18, (18, (), [(11, 1, None, None)], 1, 4, 4, 0, 112, (3, 0, None, None), 0)), ((u'PropertyReadable', u'pVal'), 19, (19, (), [(16395, 10, None, None)], 1, 2, 4, 0, 116, (3, 0, None, None), 0)), ((u'PropertyReadable', u'pVal'), 19, (19, (), [(11, 1, None, None)], 1, 4, 4, 0, 120, (3, 0, None, None), 0)), ((u'PropertyWritable', u'pVal'), 20, (20, (), [(16395, 10, None, None)], 1, 2, 4, 0, 124, (3, 0, None, None), 0)), ((u'PropertyWritable', u'pVal'), 20, (20, (), [(11, 1, None, None)], 1, 4, 4, 0, 128, (3, 0, None, None), 0)), ((u'PropertyDeletable', u'pVal'), 21, (21, (), [(16395, 10, None, None)], 1, 2, 4, 0, 132, (3, 0, None, None), 0)), ((u'PropertyDeletable', u'pVal'), 21, (21, (), [(11, 1, None, None)], 1, 4, 4, 0, 136, (3, 0, None, None), 0)), ((u'ClassSubType', u'pVal'), 22, (22, (), [(16387, 10, None, None)], 1, 2, 4, 0, 140, (3, 0, None, None), 0)), ((u'ClassSubType', u'pVal'), 22, (22, (), [(3, 1, None, None)], 1, 4, 4, 0, 144, (3, 0, None, None), 0)), ((u'ClassPrompt', u'pVal'), 23, (23, (), [(16392, 10, None, None)], 1, 2, 4, 0, 148, (3, 0, None, None), 0)), ((u'ClassPrompt', u'pVal'), 23, (23, (), [(8, 1, None, None)], 1, 4, 4, 0, 152, (3, 0, None, None), 0)), ((u'SetStyle', u'pCase', u'pFormat', u'pBlank'), 24, (24, (), [(3, 1, None, None), (3, 1, None, None), (11, 1, None, None)], 1, 1, 4, 0, 156, (3, 0, None, None), 0)), ((u'GetStyle', u'pCase', u'pFormat', u'pBlank'), 25, (25, (), [(16387, 2, None, None), (16387, 2, None, None), (16395, 2, None, None)], 1, 1, 4, 0, 160, (3, 0, None, None), 0)), ((u'SetRange', u'minValue', u'maxValue'), 26, (26, (), [(5, 1, None, None), (5, 1, None, None)], 1, 1, 4, 0, 164, (3, 0, None, None), 0)), ((u'GetRange', u'minValue', u'maxValue'), 27, (27, (), [(16389, 2, None, None), (16389, 2, None, None)], 1, 1, 4, 0, 168, (3, 0, None, None), 0))], 'python_version': 34014192, 'defaultUnnamedArg': , 'defaultNamedNotOptArg': , 'CLSID': IID('{F4503A16-F637-11D2-BD55-00500400405B}'), 'LibraryFlags': 8, 'MinorVersion': 0, 'DispatchBaseClass': , 'ITDPropClass': , '__package__': 'win32com.gen_py.F4503A16-F637-11D2-BD55-00500400405Bx0x1x0', 'IID': , 'LCID': 0, 'makepy_version': '0.5.01', '__doc__': 'think3 thinkdesign Type Library', '__builtins__': {'bytearray': , 'IndexError': , 'all': , 'help': Type help() for interactive help, or help(object) for help about object., 'vars': , 'SyntaxError': , 'unicode': , 'UnicodeDecodeError': , 'memoryview': , 'isinstance': , 'copyright': Copyright (c) 2001-2012 Python Software Foundation. All Rights Reserved. Copyright (c) 2000 BeOpen.com. All Rights Reserved. Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved. Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'NameError': , 'BytesWarning': , 'dict': , 'input': , 'oct': , 'bin': , 'SystemExit': , 'StandardError': , 'format': , 'repr': , 'sorted': , 'False': False, 'RuntimeWarning': , 'list': , 'iter': , 'reload': , 'Warning': , '__package__': None, 'round': , 'dir': , 'cmp': , 'set': , 'bytes': , 'reduce': , 'intern': , 'issubclass': , 'Ellipsis': Ellipsis, 'EOFError': , 'locals': , 'BufferError': , 'slice': , 'FloatingPointError': , 'sum': , 'getattr': , 'abs': , 'exit': Use exit() or Ctrl-Z plus Return to exit, 'print': , 'True': True, 'FutureWarning': , 'ImportWarning': , 'None': None, 'hash': , 'ReferenceError': , 'len': , 'credits': Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands for supporting Python development. See www.python.org for more information., 'frozenset': , '__name__': '__builtin__', 'ord': , 'super': , 'TypeError': , 'license': Type license() to see the full license text, 'KeyboardInterrupt': , 'UserWarning': , 'filter': , 'range': , 'staticmethod': , 'SystemError': , 'BaseException': , 'pow': , 'RuntimeError': , 'float': , 'MemoryError': , 'StopIteration': , 'globals': , 'divmod': , 'enumerate': , 'apply': , 'LookupError': , 'open': , 'quit': Use quit() or Ctrl-Z plus Return to exit, 'basestring': , 'UnicodeError': , 'zip': , 'hex': , 'long': , 'next': , 'ImportError': , 'chr': , 'xrange': , 'type': , '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", 'Exception': , 'tuple': , 'UnicodeTranslateError': , 'reversed': , 'UnicodeEncodeError': , 'IOError': , 'hasattr': , 'delattr': , 'setattr': , 'raw_input': , 'SyntaxWarning': , 'compile': , 'ArithmeticError': , 'str': , 'property': , 'GeneratorExit': , 'int': , '__import__': , 'KeyError': , 'coerce': , 'PendingDeprecationWarning': , 'file': , 'EnvironmentError': , 'unichr': , 'id': , 'OSError': , 'DeprecationWarning': , 'min': , 'UnicodeWarning': , 'execfile': , 'any': , 'complex': , 'bool': , 'ValueError': , 'NotImplemented': NotImplemented, 'map': , 'buffer': , 'max': , 'object': , 'TabError': , 'callable': , 'ZeroDivisionError': , 'eval': , '__debug__': True, 'IndentationError': , 'AssertionError': , 'classmethod': , 'UnboundLocalError': , 'NotImplementedError': , 'AttributeError': , 'OverflowError': , 'WindowsError': }, '__file__': 'C:\\Python27\\lib\\site-packages\\win32com\\gen_py\\F4503A16-F637-11D2-BD55-00500400405Bx0x1x0\\ITDPropClass.pyc', 'ITDPropClass_vtables_dispatch_': 1, '__name__': 'win32com.gen_py.F4503A16-F637-11D2-BD55-00500400405Bx0x1x0.ITDPropClass', 'pywintypes': , 'defaultNamedOptArg': , 'MajorVersion': 1, 'Dispatch': , 'win32com': , 'pythoncom': } Il 01/10/2012 03:41, Mark Hammond ha scritto: > On 28/09/2012 10:42 PM, Matteo Boscolo wrote: >> this is the log of part of my application >> >> DEBUG:root:__DEL__ >> DEBUG:root:pythoncom._GetInterfaceCount(): 4 >> DEBUG:root:pythoncom._GetGatewayCount(): 0| >> DEBUG:Root:pythoncom.CoUninitialize()| >> DEBUG:root:pythoncom._GetInterfaceCount(): 4 >> DEBUG:root:pythoncom._GetGatewayCount(): 0 >> >> as you can see the GetInterfaceCount is still at 4 .. >> there is a way to know witch object are the 4 that came from the >> GetInterfaceCount ? > > Not directly - only a simple counter is tracked, not a list of what > the objects are. If you are lucky, you might be able to use the 'gc' > module to locate all live objects and see what you can find alive that > "looks" like a COM object (but even that probably will not tell you > where the reference actually lives) > > Mark > >> >> regards, >> matteo >> >> >> >> _______________________________________________ >> python-win32 mailing list >> python-win32 at python.org >> http://mail.python.org/mailman/listinfo/python-win32 >> > > From mhammond at skippinet.com.au Tue Oct 2 07:50:59 2012 From: mhammond at skippinet.com.au (Mark Hammond) Date: Tue, 02 Oct 2012 15:50:59 +1000 Subject: [python-win32] info on _GetInterfaceCount In-Reply-To: <506A176D.1010507@boscolini.eu> References: <5064EDB8.90509@gmail.com> <50659B50.7080801@boscolini.eu> <5068F4BB.4030301@gmail.com> <506A176D.1010507@boscolini.eu> Message-ID: <506A80C3.6000804@skippinet.com.au> These are probably just the objects defined in the makepy generated files. You are looking for object which describe themself as a "PyIDispatch" (or possibly PyIUnknown) HTH, Mark On 2/10/2012 8:21 AM, Matteo Boscolo wrote: > I'm going on with my stydy, inspecting the gc.. > > the only object that seems very satrange is listed below. > ITDPropClass its the com object of the com application > there is somone that can tell me if i'm on the right way? > dose _vtables_ have a particular mening? > > regards, > Matteo > > 42760064 > {'ITDPropClass_vtables_': [((u'Name', u'pVal'), 10, (10, (), [(16392, > 10, None, None)], 1, 2, 4, 0, 60, (3, 0, None, None), 0)), > ((u'SetValue', u'typeValue', u'maxElValue'), 11, (11, (), [(12, 1, None, > None), (3, 1, None, None)], 1, 1, 4, 0, 64, (3, 0, None, None), 0)), > ((u'GetValue', u'typeValue', u'maxElValue'), 12, (12, (), [(16396, 2, > None, None), (16387, 2, None, None)], 1, 1, 4, 0, 68, (3, 0, None, > None), 0)), ((u'Description', u'pVal'), 13, (13, (), [(16392, 10, None, > None)], 1, 2, 4, 0, 72, (3, 0, None, None), 0)), ((u'Description', > u'pVal'), 13, (13, (), [(8, 1, None, None)], 1, 4, 4, 0, 76, (3, 0, > None, None), 0)), ((u'UsedBy', u'pVal'), 14, (14, (), [(24585, 10, None, > "IID('{D344208D-C991-11D3-BDD6-00500400405B}')")], 1, 2, 4, 0, 80, (3, > 0, None, None), 0)), ((u'ClassReadable', u'pVal'), 15, (15, (), [(16395, > 10, None, None)], 1, 2, 4, 0, 84, (3, 0, None, None), 0)), > ((u'ClassReadable', u'pVal'), 15, (15, (), [(11, 1, None, None)], 1, 4, > 4, 0, 88, (3, 0, None, None), 0)), ((u'ClassWritable', u'pVal'), 16, > (16, (), [(16395, 10, None, None)], 1, 2, 4, 0, 92, (3, 0, None, None), > 0)), ((u'ClassWritable', u'pVal'), 16, (16, (), [(11, 1, None, None)], > 1, 4, 4, 0, 96, (3, 0, None, None), 0)), ((u'ClassDeletable', u'pVal'), > 17, (17, (), [(16395, 10, None, None)], 1, 2, 4, 0, 100, (3, 0, None, > None), 0)), ((u'ClassDeletable', u'pVal'), 17, (17, (), [(11, 1, None, > None)], 1, 4, 4, 0, 104, (3, 0, None, None), 0)), > ((u'PropertyInheritance', u'pVal'), 18, (18, (), [(16395, 10, None, > None)], 1, 2, 4, 0, 108, (3, 0, None, None), 0)), > ((u'PropertyInheritance', u'pVal'), 18, (18, (), [(11, 1, None, None)], > 1, 4, 4, 0, 112, (3, 0, None, None), 0)), ((u'PropertyReadable', > u'pVal'), 19, (19, (), [(16395, 10, None, None)], 1, 2, 4, 0, 116, (3, > 0, None, None), 0)), ((u'PropertyReadable', u'pVal'), 19, (19, (), [(11, > 1, None, None)], 1, 4, 4, 0, 120, (3, 0, None, None), 0)), > ((u'PropertyWritable', u'pVal'), 20, (20, (), [(16395, 10, None, None)], > 1, 2, 4, 0, 124, (3, 0, None, None), 0)), ((u'PropertyWritable', > u'pVal'), 20, (20, (), [(11, 1, None, None)], 1, 4, 4, 0, 128, (3, 0, > None, None), 0)), ((u'PropertyDeletable', u'pVal'), 21, (21, (), > [(16395, 10, None, None)], 1, 2, 4, 0, 132, (3, 0, None, None), 0)), > ((u'PropertyDeletable', u'pVal'), 21, (21, (), [(11, 1, None, None)], 1, > 4, 4, 0, 136, (3, 0, None, None), 0)), ((u'ClassSubType', u'pVal'), 22, > (22, (), [(16387, 10, None, None)], 1, 2, 4, 0, 140, (3, 0, None, None), > 0)), ((u'ClassSubType', u'pVal'), 22, (22, (), [(3, 1, None, None)], 1, > 4, 4, 0, 144, (3, 0, None, None), 0)), ((u'ClassPrompt', u'pVal'), 23, > (23, (), [(16392, 10, None, None)], 1, 2, 4, 0, 148, (3, 0, None, None), > 0)), ((u'ClassPrompt', u'pVal'), 23, (23, (), [(8, 1, None, None)], 1, > 4, 4, 0, 152, (3, 0, None, None), 0)), ((u'SetStyle', u'pCase', > u'pFormat', u'pBlank'), 24, (24, (), [(3, 1, None, None), (3, 1, None, > None), (11, 1, None, None)], 1, 1, 4, 0, 156, (3, 0, None, None), 0)), > ((u'GetStyle', u'pCase', u'pFormat', u'pBlank'), 25, (25, (), [(16387, > 2, None, None), (16387, 2, None, None), (16395, 2, None, None)], 1, 1, > 4, 0, 160, (3, 0, None, None), 0)), ((u'SetRange', u'minValue', > u'maxValue'), 26, (26, (), [(5, 1, None, None), (5, 1, None, None)], 1, > 1, 4, 0, 164, (3, 0, None, None), 0)), ((u'GetRange', u'minValue', > u'maxValue'), 27, (27, (), [(16389, 2, None, None), (16389, 2, None, > None)], 1, 1, 4, 0, 168, (3, 0, None, None), 0))], 'python_version': > 34014192, 'defaultUnnamedArg': , > 'defaultNamedNotOptArg': , 'CLSID': > IID('{F4503A16-F637-11D2-BD55-00500400405B}'), 'LibraryFlags': 8, > 'MinorVersion': 0, 'DispatchBaseClass': win32com.client.DispatchBaseClass at 0x027AD228>, 'ITDPropClass': win32com.gen_py.F4503A16-F637-11D2-BD55-00500400405Bx0x1x0.ITDPropClass.ITDPropClass > at 0x028C46F8>, '__package__': > 'win32com.gen_py.F4503A16-F637-11D2-BD55-00500400405Bx0x1x0', 'IID': > , 'LCID': 0, 'makepy_version': '0.5.01', > '__doc__': 'think3 thinkdesign Type Library', '__builtins__': > {'bytearray': , 'IndexError': 'exceptions.IndexError'>, 'all': , 'help': Type > help() for interactive help, or help(object) for help about object., > 'vars': , 'SyntaxError': 'exceptions.SyntaxError'>, 'unicode': , > 'UnicodeDecodeError': , > 'memoryview': , 'isinstance': isinstance>, 'copyright': Copyright (c) 2001-2012 Python Software > Foundation. > All Rights Reserved. > > Copyright (c) 2000 BeOpen.com. > All Rights Reserved. > > Copyright (c) 1995-2001 Corporation for National Research Initiatives. > All Rights Reserved. > > Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. > All Rights Reserved., 'NameError': , > 'BytesWarning': , 'dict': , > 'input': , 'oct': , > 'bin': , 'SystemExit': 'exceptions.SystemExit'>, 'StandardError': 'exceptions.StandardError'>, 'format': , > 'repr': , 'sorted': , > 'False': False, 'RuntimeWarning': , > 'list': , 'iter': , 'reload': > , 'Warning': , > '__package__': None, 'round': , 'dir': > , 'cmp': , 'set': 'set'>, 'bytes': , 'reduce': , > 'intern': , 'issubclass': issubclass>, 'Ellipsis': Ellipsis, 'EOFError': 'exceptions.EOFError'>, 'locals': , > 'BufferError': , 'slice': , > 'FloatingPointError': , 'sum': > , 'getattr': , 'abs': > , 'exit': Use exit() or Ctrl-Z plus Return to > exit, 'print': , 'True': True, 'FutureWarning': > , 'ImportWarning': 'exceptions.ImportWarning'>, 'None': None, 'hash': hash>, 'ReferenceError': , 'len': > , 'credits': Thanks to CWI, CNRI, BeOpen.com, > Zope Corporation and a cast of thousands > for supporting Python development. See www.python.org for more > information., 'frozenset': , '__name__': > '__builtin__', 'ord': , 'super': , > 'TypeError': , 'license': Type license() to > see the full license text, 'KeyboardInterrupt': 'exceptions.KeyboardInterrupt'>, 'UserWarning': 'exceptions.UserWarning'>, 'filter': , > 'range': , 'staticmethod': 'staticmethod'>, 'SystemError': , > 'BaseException': , 'pow': function pow>, 'RuntimeError': , > 'float': , 'MemoryError': , > 'StopIteration': , 'globals': function globals>, 'divmod': , 'enumerate': > , 'apply': , 'LookupError': > , 'open': , > 'quit': Use quit() or Ctrl-Z plus Return to exit, 'basestring': 'basestring'>, 'UnicodeError': , 'zip': > , 'hex': , 'long': 'long'>, 'next': , 'ImportError': 'exceptions.ImportError'>, 'chr': , 'xrange': > , 'type': , '__doc__': "Built-in functions, > exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; > Ellipsis represents `...' in slices.", 'Exception': 'exceptions.Exception'>, 'tuple': , > 'UnicodeTranslateError': , > 'reversed': , 'UnicodeEncodeError': 'exceptions.UnicodeEncodeError'>, 'IOError': 'exceptions.IOError'>, 'hasattr': , > 'delattr': , 'setattr': setattr>, 'raw_input': , > 'SyntaxWarning': , 'compile': function compile>, 'ArithmeticError': 'exceptions.ArithmeticError'>, 'str': , 'property': 'property'>, 'GeneratorExit': , 'int': > , '__import__': , 'KeyError': > , 'coerce': , > 'PendingDeprecationWarning': 'exceptions.PendingDeprecationWarning'>, 'file': , > 'EnvironmentError': , 'unichr': > , 'id': , 'OSError': > , 'DeprecationWarning': 'exceptions.DeprecationWarning'>, 'min': , > 'UnicodeWarning': , 'execfile': > , 'any': , 'complex': > , 'bool': , 'ValueError': 'exceptions.ValueError'>, 'NotImplemented': NotImplemented, 'map': > , 'buffer': , 'max': function max>, 'object': , 'TabError': 'exceptions.TabError'>, 'callable': , > 'ZeroDivisionError': , 'eval': > , '__debug__': True, 'IndentationError': 'exceptions.IndentationError'>, 'AssertionError': 'exceptions.AssertionError'>, 'classmethod': , > 'UnboundLocalError': , > 'NotImplementedError': , > 'AttributeError': , 'OverflowError': > , 'WindowsError': 'exceptions.WindowsError'>}, '__file__': > 'C:\\Python27\\lib\\site-packages\\win32com\\gen_py\\F4503A16-F637-11D2-BD55-00500400405Bx0x1x0\\ITDPropClass.pyc', > 'ITDPropClass_vtables_dispatch_': 1, '__name__': > 'win32com.gen_py.F4503A16-F637-11D2-BD55-00500400405Bx0x1x0.ITDPropClass', > 'pywintypes': 'C:\Windows\system32\pywintypes27.dll'>, 'defaultNamedOptArg': > , 'MajorVersion': 1, 'Dispatch': > , 'win32com': 'C:\Python27\lib\site-packages\win32com\__init__.pyc'>, 'pythoncom': > } > > > Il 01/10/2012 03:41, Mark Hammond ha scritto: >> On 28/09/2012 10:42 PM, Matteo Boscolo wrote: >>> this is the log of part of my application >>> >>> DEBUG:root:__DEL__ >>> DEBUG:root:pythoncom._GetInterfaceCount(): 4 >>> DEBUG:root:pythoncom._GetGatewayCount(): 0| >>> DEBUG:Root:pythoncom.CoUninitialize()| >>> DEBUG:root:pythoncom._GetInterfaceCount(): 4 >>> DEBUG:root:pythoncom._GetGatewayCount(): 0 >>> >>> as you can see the GetInterfaceCount is still at 4 .. >>> there is a way to know witch object are the 4 that came from the >>> GetInterfaceCount ? >> >> Not directly - only a simple counter is tracked, not a list of what >> the objects are. If you are lucky, you might be able to use the 'gc' >> module to locate all live objects and see what you can find alive that >> "looks" like a COM object (but even that probably will not tell you >> where the reference actually lives) >> >> Mark >> >>> >>> regards, >>> matteo >>> >>> >>> >>> _______________________________________________ >>> python-win32 mailing list >>> python-win32 at python.org >>> http://mail.python.org/mailman/listinfo/python-win32 >>> >> >> > From mhammond at skippinet.com.au Wed Oct 3 08:29:46 2012 From: mhammond at skippinet.com.au (Mark Hammond) Date: Wed, 03 Oct 2012 16:29:46 +1000 Subject: [python-win32] Getting Error "Pure Virtual Function Call R6025" Error In-Reply-To: References: <5064EDB8.90509@gmail.com> Message-ID: <506BDB5A.9030806@skippinet.com.au> [Please keep python-win32 in the CC list] On 3/10/2012 4:26 PM, vamsi krishna wrote: > Hi Mark, > > Thank you for the reply. Please let me know what kind of information > is useful in this context and I'm ready to provide the information. > At first I thought of assuming the same i.e. problem with HP QTP COM > libraries. But the question which is haunting me is this code > perfectly worked for almost one month and suddenly started creating > this problem. Still some times this code is working fine. But that doesn't point a finger in any specific direction either :( Probably what we need to know is the stack when this happens, but that is probably very hard to grab without MSVC or possibly one of the sysinternals tools... Cheers, Mark > > Best Regards, > Vamsi. > > > On Fri, Sep 28, 2012 at 5:52 AM, Mark Hammond wrote: >> I'm afraid there isn't enough information provided here for us to help. At >> face value, it sounds like a problem in the HP QTP COM libraries. >> >> Mark >> >> >> On 25/09/2012 2:14 PM, vamsi krishna wrote: >>> >>> Hi, >>> >>> Running on Windows 2003 Server X64,Python 2.5 (32-bit) >>> >>> I am having problems using win32com.client with the HP QTP COM >>> libraries. I'm trying to launch QTP from python by following code: >>> >>> import win32com.client >>> >>> qtp = win32com.client.Dispatch("QuickTest.Application") >>> # starts up QTP >>> qtp.Launch() >>> qtp.Visible = False >>> time.sleep(30) >>> qtp.quit() >>> >>> At first it starts working without any glitches. but currently it is >>> always raising windows c++ error saying "pure virtual function call >>> R6025". >>> >>> Please provide information on how to tackle this issue. >>> >>> >>> Regards, >>> Vamsi. >>> _______________________________________________ >>> python-win32 mailing list >>> python-win32 at python.org >>> http://mail.python.org/mailman/listinfo/python-win32 >>> >> From Paul_Koning at Dell.com Wed Oct 3 15:16:17 2012 From: Paul_Koning at Dell.com (Paul_Koning at Dell.com) Date: Wed, 3 Oct 2012 13:16:17 +0000 Subject: [python-win32] Getting Error "Pure Virtual Function Call R6025" Error In-Reply-To: <506BDB5A.9030806@skippinet.com.au> References: <5064EDB8.90509@gmail.com> <506BDB5A.9030806@skippinet.com.au> Message-ID: I don't know how Windows C++ works, but with GCC this error almost always indicates you're using an object after it has been freed. The reason is that freeing the object calls the destructors in inheritance order, and changes the virtual method pointer table as it does so. The end result is a free object whose vtable points to that of the earliest base class, with pointers to error handlers for any pure virtual method. So look for use-after-free errors. paul On Oct 3, 2012, at 2:29 AM, Mark Hammond wrote: > [Please keep python-win32 in the CC list] > > On 3/10/2012 4:26 PM, vamsi krishna wrote: >> Hi Mark, >> >> Thank you for the reply. Please let me know what kind of information >> is useful in this context and I'm ready to provide the information. >> At first I thought of assuming the same i.e. problem with HP QTP COM >> libraries. But the question which is haunting me is this code >> perfectly worked for almost one month and suddenly started creating >> this problem. Still some times this code is working fine. > > But that doesn't point a finger in any specific direction either :( > > Probably what we need to know is the stack when this happens, but that is probably very hard to grab without MSVC or possibly one of the sysinternals tools... > > Cheers, > > Mark >> >> Best Regards, >> Vamsi. >> >> >> On Fri, Sep 28, 2012 at 5:52 AM, Mark Hammond wrote: >>> I'm afraid there isn't enough information provided here for us to help. At >>> face value, it sounds like a problem in the HP QTP COM libraries. >>> >>> Mark >>> >>> >>> On 25/09/2012 2:14 PM, vamsi krishna wrote: >>>> >>>> Hi, >>>> >>>> Running on Windows 2003 Server X64,Python 2.5 (32-bit) >>>> >>>> I am having problems using win32com.client with the HP QTP COM >>>> libraries. I'm trying to launch QTP from python by following code: >>>> >>>> import win32com.client >>>> >>>> qtp = win32com.client.Dispatch("QuickTest.Application") >>>> # starts up QTP >>>> qtp.Launch() >>>> qtp.Visible = False >>>> time.sleep(30) >>>> qtp.quit() >>>> >>>> At first it starts working without any glitches. but currently it is >>>> always raising windows c++ error saying "pure virtual function call >>>> R6025". >>>> >>>> Please provide information on how to tackle this issue. >>>> >>>> >>>> Regards, >>>> Vamsi. >>>> _______________________________________________ >>>> python-win32 mailing list >>>> python-win32 at python.org >>>> http://mail.python.org/mailman/listinfo/python-win32 >>>> >>> > > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > http://mail.python.org/mailman/listinfo/python-win32 From mattl at google.com Wed Oct 3 23:50:06 2012 From: mattl at google.com (Matt LaPlante) Date: Wed, 3 Oct 2012 16:50:06 -0500 Subject: [python-win32] unicode breaks win32com? Message-ID: I'm using win32com to query AD for the adsPath as below. It's come to my attention that a user with unicode is apparently breaking this. user = 'mrunicode' dnc = win32com.adsi.ADsGetObject('LDAP://rootDSE').Get('DefaultNamingContext') ado = win32com.client.Dispatch('ADODB.Connection') ado.Open('Provider=ADsDSOObject') lfilter = '(&(sAMAccountName=%s)(objectCategory=User))' % user search = ';%s;adsPath;subtree' % (dnc, lfilter) obj_record = ado.Execute(search)[0] print obj_record.Fields('adsPath')) Traceback (most recent call last): File "", line 1, in File "C:\python_26\files\lib\site-packages\win32com\client\dynamic.py", line 201, in __str__ return str(self.__call__()) UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' in position 11: ordinal not in range(128) Is there a workaround for this? -------------- next part -------------- An HTML attachment was scrubbed... URL: From planders at gmail.com Thu Oct 4 00:17:20 2012 From: planders at gmail.com (Preston Landers) Date: Wed, 3 Oct 2012 17:17:20 -0500 Subject: [python-win32] unicode breaks win32com? In-Reply-To: References: Message-ID: This is probably not the "correct" answer, but you can see if it helps. At the top of your script try adding this: import sys sys.setdefaultencoding("utf-8") On Wed, Oct 3, 2012 at 4:50 PM, Matt LaPlante wrote: > I'm using win32com to query AD for the adsPath as below. It's come to my > attention that a user with unicode is apparently breaking this. > > user = 'mrunicode' > dnc = > win32com.adsi.ADsGetObject('LDAP://rootDSE').Get('DefaultNamingContext') > ado = win32com.client.Dispatch('ADODB.Connection') > ado.Open('Provider=ADsDSOObject') > lfilter = '(&(sAMAccountName=%s)(objectCategory=User))' % user > search = ';%s;adsPath;subtree' % (dnc, lfilter) > obj_record = ado.Execute(search)[0] > print obj_record.Fields('adsPath')) > Traceback (most recent call last): > File "", line 1, in > File "C:\python_26\files\lib\site-packages\win32com\client\dynamic.py", > line 201, in __str__ > return str(self.__call__()) > UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' in > position 11: ordinal not in range(128) > > Is there a workaround for this? > > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > http://mail.python.org/mailman/listinfo/python-win32 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mail at timgolden.me.uk Thu Oct 4 09:47:42 2012 From: mail at timgolden.me.uk (Tim Golden) Date: Thu, 04 Oct 2012 08:47:42 +0100 Subject: [python-win32] unicode breaks win32com? In-Reply-To: References: Message-ID: <506D3F1E.3080604@timgolden.me.uk> On 03/10/2012 22:50, Matt LaPlante wrote: > user = 'mrunicode' > dnc = > win32com.adsi.ADsGetObject('LDAP://rootDSE').Get('DefaultNamingContext') > ado = win32com.client.Dispatch('ADODB.Connection') > ado.Open('Provider=ADsDSOObject') > lfilter = '(&(sAMAccountName=%s)(objectCategory=User))' % user > search = ';%s;adsPath;subtree' % (dnc, lfilter) > obj_record = ado.Execute(search)[0] > print obj_record.Fields('adsPath')) print obj_record.Field("ADsPath").Value which doesn't attempt to do an implicit encode on the string TJG From knowledgealerts at gmail.com Fri Oct 5 08:39:50 2012 From: knowledgealerts at gmail.com (vamsi krishna) Date: Fri, 5 Oct 2012 12:09:50 +0530 Subject: [python-win32] Getting Error "Pure Virtual Function Call R6025" Error In-Reply-To: References: <5064EDB8.90509@gmail.com> <506BDB5A.9030806@skippinet.com.au> Message-ID: Hi Paul, Thank you for sharing the information. I'm started looking for the " use-after-free errors" errors. I will update you on this. Once again thank you very much for the information. Regards, Vamsi. On Wed, Oct 3, 2012 at 6:46 PM, wrote: > I don't know how Windows C++ works, but with GCC this error almost always indicates you're using an object after it has been freed. The reason is that freeing the object calls the destructors in inheritance order, and changes the virtual method pointer table as it does so. The end result is a free object whose vtable points to that of the earliest base class, with pointers to error handlers for any pure virtual method. > > So look for use-after-free errors. > > paul > > On Oct 3, 2012, at 2:29 AM, Mark Hammond wrote: > >> [Please keep python-win32 in the CC list] >> >> On 3/10/2012 4:26 PM, vamsi krishna wrote: >>> Hi Mark, >>> >>> Thank you for the reply. Please let me know what kind of information >>> is useful in this context and I'm ready to provide the information. >>> At first I thought of assuming the same i.e. problem with HP QTP COM >>> libraries. But the question which is haunting me is this code >>> perfectly worked for almost one month and suddenly started creating >>> this problem. Still some times this code is working fine. >> >> But that doesn't point a finger in any specific direction either :( >> >> Probably what we need to know is the stack when this happens, but that is probably very hard to grab without MSVC or possibly one of the sysinternals tools... >> >> Cheers, >> >> Mark >>> >>> Best Regards, >>> Vamsi. >>> >>> >>> On Fri, Sep 28, 2012 at 5:52 AM, Mark Hammond wrote: >>>> I'm afraid there isn't enough information provided here for us to help. At >>>> face value, it sounds like a problem in the HP QTP COM libraries. >>>> >>>> Mark >>>> >>>> >>>> On 25/09/2012 2:14 PM, vamsi krishna wrote: >>>>> >>>>> Hi, >>>>> >>>>> Running on Windows 2003 Server X64,Python 2.5 (32-bit) >>>>> >>>>> I am having problems using win32com.client with the HP QTP COM >>>>> libraries. I'm trying to launch QTP from python by following code: >>>>> >>>>> import win32com.client >>>>> >>>>> qtp = win32com.client.Dispatch("QuickTest.Application") >>>>> # starts up QTP >>>>> qtp.Launch() >>>>> qtp.Visible = False >>>>> time.sleep(30) >>>>> qtp.quit() >>>>> >>>>> At first it starts working without any glitches. but currently it is >>>>> always raising windows c++ error saying "pure virtual function call >>>>> R6025". >>>>> >>>>> Please provide information on how to tackle this issue. >>>>> >>>>> >>>>> Regards, >>>>> Vamsi. >>>>> _______________________________________________ >>>>> python-win32 mailing list >>>>> python-win32 at python.org >>>>> http://mail.python.org/mailman/listinfo/python-win32 >>>>> >>>> >> >> _______________________________________________ >> python-win32 mailing list >> python-win32 at python.org >> http://mail.python.org/mailman/listinfo/python-win32 > From Juliette.Mcilroy at aesi.com Tue Oct 9 01:23:29 2012 From: Juliette.Mcilroy at aesi.com (Juliette Mcilroy) Date: Mon, 8 Oct 2012 16:23:29 -0700 Subject: [python-win32] SW Development Engineer in Test/South Bay Area Message-ID: My client top Silicon Valley Client is looking for someone who has hands-on testing experience with Windows API Frameworks in both 32-bit and 64-bit environment plus scripting in Python. The ideal candidate will have the following experience: ? Demonstrated experience and understanding of C Language. This means you have recent experience with C/C++ programming experience specific to Windows environments. The strength of your programming knowledge and skills will be thoroughly examined. ? Demonstrated experience with testing Windows API Frameworks in an enterprise environment. ? Thorough understanding of QA white box Testing methodologies. You can demonstrate your ability to create unique test plans from scratch and execute these test plans with minimal supervision and oversight. ? Demonstrated hands-on experience designing and creating automation scripts for unit testing and above using common scripting languages (Python, Perl, VB); Python is preferable. ? Demonstrated experience in owning testing in a fluid, fast paced environment. You have the exceptional communication skills needed to gather information from multiple stakeholders and suggest reasonable priorities against constantly moving targets. If you're interest is piqued, please shoot me an email with your resume and the best day/time/contact number to reach you & I'll be sure to follow up! Thank You in advance for your time! Juliette McIlroy Lead Technical Recruiter Albin Engineering Services Inc. ph : 408-733-AESI (2374) x18 juliette.mcilroy at aesi.com www.aesi.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From Srinu.Pamidi at nexteraenergy.com Fri Oct 12 09:24:49 2012 From: Srinu.Pamidi at nexteraenergy.com (Pamidi, Srinu) Date: Fri, 12 Oct 2012 03:24:49 -0400 Subject: [python-win32] Error while executing pythonWin script Message-ID: Hi, we are getting exceptions while executing pythonWin script. Please find attachment contains error messages. The python script uses ArcInfo toolbox(ESRI component) to perform geoprocessing opeations. script was implemented on python21,pythonwin32. Now I am trying to run old version of script on python251 version. Just to make oold version of script we installed pywin32-210.win32-py2.5.exe and trying to execute. Can you please let me know what could be the issue. Thanks, Srinu P -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: python_error.txt URL: From jmfrank63 at gmail.com Fri Oct 12 13:13:30 2012 From: jmfrank63 at gmail.com (Johannes Frank) Date: Fri, 12 Oct 2012 13:13:30 +0200 Subject: [python-win32] VARIANT parameter Message-ID: Hello, I am trying to access an AutoCAD clone, intellicad, via win32com. I managed to access, but now I am stuck. AutoCAD as well as Intellicad want filterType=VARIANT(pythoncom.VT_ARRAY,[0]) filterData=VARIANT(pythoncom.VT_ARRAY,['LINE']) dwg.ActiveSpace = cnsts.vicModelSpace sel.Select(cnsts.vicSelectionSetAll,None,None,filterType,filterData) I get an error: MemoryError: CreatingSafeArray In VB6 I pass two variant arrays in VB.NET 2010 I pass an integer array and an object array. Now how do I find out how to pass this parameter in pythoncom / win32com Thank you for your attention Kind Regards -- Dipl.-Ing. (FH) Johannes-Maria Frank Bildungsberater K?nigsberger-Str. 19b 76139 Karlsruhe Tel. +49(170) 3833849 e-mail: jmfrank63 at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From matteo.boscolo at boscolini.eu Fri Oct 12 13:27:11 2012 From: matteo.boscolo at boscolini.eu (Matteo Boscolo) Date: Fri, 12 Oct 2012 13:27:11 +0200 Subject: [python-win32] VARIANT parameter In-Reply-To: References: Message-ID: <5077FE8F.7040109@boscolini.eu> sometimes you need a combination of variant type like win32com.client.VARIANT(VT_VARIANT | VT_NULL,None) it's better to pass tuple instead of list .. may be this could help .. regards, Matteo Il 12/10/2012 13:13, Johannes Frank ha scritto: > Hello, > > I am trying to access an AutoCAD clone, intellicad, via win32com. I > managed to access, but now I am stuck. > AutoCAD as well as Intellicad want > > filterType=VARIANT(pythoncom.VT_ARRAY,[0]) > filterData=VARIANT(pythoncom.VT_ARRAY,['LINE']) > dwg.ActiveSpace = cnsts.vicModelSpace > sel.Select(cnsts.vicSelectionSetAll,None,None,filterType,filterData) > > I get an error: > > MemoryError: CreatingSafeArray > > In VB6 I pass two variant arrays in VB.NET 2010 I pass > an integer array and an object array. > > Now how do I find out how to pass this parameter in pythoncom / win32com > > Thank you for your attention > > Kind Regards > > -- > Dipl.-Ing. (FH) Johannes-Maria Frank > Bildungsberater > K?nigsberger-Str. 19b > 76139 Karlsruhe > Tel. +49(170) 3833849 > e-mail: jmfrank63 at gmail.com > > > > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > http://mail.python.org/mailman/listinfo/python-win32 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.glassman at gmail.com Fri Oct 12 15:20:57 2012 From: dan.glassman at gmail.com (Dan Glassman) Date: Fri, 12 Oct 2012 08:20:57 -0500 Subject: [python-win32] VARIANT parameter In-Reply-To: <5077FE8F.7040109@boscolini.eu> References: <5077FE8F.7040109@boscolini.eu> Message-ID: On Fri, Oct 12, 2012 at 6:27 AM, Matteo Boscolo wrote: > sometimes you need a combination of variant type like > win32com.client.VARIANT(VT_VARIANT | VT_NULL,None) > In this case, AutoCAD and Intellicad want: filterType = VARIANT(pythoncom.VT_ARRAY | pythoncom.VT_I2, [0]) filterData = VARIANT(pythoncom.VT_ARRAY | pythoncom.VT_VARIANT, ['LINE']) -drg On Fri, Oct 12, 2012 at 6:27 AM, Matteo Boscolo wrote: > > sometimes you need a combination of variant type like > win32com.client.VARIANT(VT_VARIANT | VT_NULL,None) > > it's better to pass tuple instead of list .. may be this could help .. > > regards, > Matteo > > Il 12/10/2012 13:13, Johannes Frank ha scritto: > > Hello, > > I am trying to access an AutoCAD clone, intellicad, via win32com. I > managed to access, but now I am stuck. > AutoCAD as well as Intellicad want > > filterType=VARIANT(pythoncom.VT_ARRAY,[0]) > filterData=VARIANT(pythoncom.VT_ARRAY,['LINE']) > dwg.ActiveSpace = cnsts.vicModelSpace > > sel.Select(cnsts.vicSelectionSetAll,None,None,filterType,filterData) > > I get an error: > > MemoryError: CreatingSafeArray > > In VB6 I pass two variant arrays in VB.NET 2010 I pass an integer array > and an object array. > > Now how do I find out how to pass this parameter in pythoncom / win32com > > Thank you for your attention > > Kind Regards > > -- > Dipl.-Ing. (FH) Johannes-Maria Frank > Bildungsberater > K?nigsberger-Str. 19b > 76139 Karlsruhe > Tel. +49(170) 3833849 > e-mail: jmfrank63 at gmail.com > > > > _______________________________________________ > python-win32 mailing listpython-win32 at python.orghttp://mail.python.org/mailman/listinfo/python-win32 > > > > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > http://mail.python.org/mailman/listinfo/python-win32 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmfrank63 at gmail.com Fri Oct 12 15:26:14 2012 From: jmfrank63 at gmail.com (Johannes Frank) Date: Fri, 12 Oct 2012 15:26:14 +0200 Subject: [python-win32] VARIANT parameter In-Reply-To: References: Message-ID: Thank you Dan, it works like a charm. 2012/10/12 Johannes Frank > Hello, > > I am trying to access an AutoCAD clone, intellicad, via win32com. I > managed to access, but now I am stuck. > AutoCAD as well as Intellicad want > > filterType=VARIANT(pythoncom.VT_ARRAY,[0]) > filterData=VARIANT(pythoncom.VT_ARRAY,['LINE']) > dwg.ActiveSpace = cnsts.vicModelSpace > > sel.Select(cnsts.vicSelectionSetAll,None,None,filterType,filterData) > > I get an error: > > MemoryError: CreatingSafeArray > > In VB6 I pass two variant arrays in VB.NET 2010 I pass an integer array > and an object array. > > Now how do I find out how to pass this parameter in pythoncom / win32com > > Thank you for your attention > > Kind Regards > > -- > Dipl.-Ing. (FH) Johannes-Maria Frank > Bildungsberater > K?nigsberger-Str. 19b > 76139 Karlsruhe > Tel. +49(170) 3833849 > e-mail: jmfrank63 at gmail.com > > -- Dipl.-Ing. (FH) Johannes-Maria Frank Bildungsberater K?nigsberger-Str. 19b 76139 Karlsruhe Tel. +49(170) 3833849 e-mail: jmfrank63 at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From nieuws.pv at xs4all.nl Sun Oct 14 15:17:10 2012 From: nieuws.pv at xs4all.nl (Patrick Vrijlandt) Date: Sun, 14 Oct 2012 15:17:10 +0200 Subject: [python-win32] pywin32 build 217 for 3.3 Message-ID: Hi all, I'm trying to install pywin32 build 217 for python 3.3 on my Vista machine. The same machine has Python 2.7 and 3.2 including the respective pywin versions installed. Python 3.3 is the recent official release. Its install went smoothly. The postinstall script shows a traceback: Traceback (most recent call last): File "", line 612, in File "", line 322, in install File "", line 160, in LoadSystemModule File "C:\Python33\lib\imp.py", line 158, in load_module raise ValueError(msg) ValueError: file object required for import (type code 3) When I ignore the error and try to start pythonwin.exe (from C:\Python33\Lib\site-packages\pythonwin\Pythonwin.exe) it will not start, saying it's unable to "find win32ui.pyd (or python) (126)". However, apparently win32ui.pyd is alongside Pythonwin.exe in C:\Python33\Lib\site-packages\pythonwin. Copying python.exe from C:\Python33 to C:\Python33\Lib\site-packages\pythonwin did not help. Any ideas? Thanks, Patrick -------------- next part -------------- An HTML attachment was scrubbed... URL: From efotinis at gmail.com Sun Oct 14 18:11:30 2012 From: efotinis at gmail.com (Elias Fotinis) Date: Sun, 14 Oct 2012 19:11:30 +0300 Subject: [python-win32] pywin32 build 217 for 3.3 In-Reply-To: References: Message-ID: On Sun, 14 Oct 2012 16:17:10 +0300, Patrick Vrijlandt wrote: > I'm trying to install pywin32 build 217 for python 3.3 on my Vista machine. ... > The postinstall script shows a traceback: ... > File "C:\Python33\lib\imp.py", line 158, in load_module > > raise ValueError(msg) > > ValueError: file object required for import (type code 3) It's a known bug; probably something to do with the new import functionality in Python 3.3: As stated in the report, the fix is already in the the latest revision of pywin32. If you can't wait for the next release, you could try building it yourself. From drobinow at gmail.com Sun Oct 14 18:26:10 2012 From: drobinow at gmail.com (David Robinow) Date: Sun, 14 Oct 2012 12:26:10 -0400 Subject: [python-win32] pywin32 build 217 for 3.3 In-Reply-To: References: Message-ID: On Sun, Oct 14, 2012 at 9:17 AM, Patrick Vrijlandt wrote: ... > I?m trying to install pywin32 build 217 for python 3.3 on my Vista machine. > The postinstall script shows a traceback: ... > When I ignore the error and try to start pythonwin.exe (from > C:\Python33\Lib\site-packages\pythonwin\Pythonwin.exe) it will not start, > saying it?s unable to ?find win32ui.pyd (or python) (126)?. However, > apparently win32ui.pyd is alongside Pythonwin.exe in > C:\Python33\Lib\site-packages\pythonwin. Copying python.exe from C:\Python33 > to C:\Python33\Lib\site-packages\pythonwin did not help. > Any ideas? I haven't tried the 64 bit version but the 32 bit release (from Feb 2012) appears to be compiled with VC2008, whereas Python 3.3 is compiled with VC2010. From jmfrank63 at gmail.com Wed Oct 17 16:42:42 2012 From: jmfrank63 at gmail.com (Johannes Frank) Date: Wed, 17 Oct 2012 16:42:42 +0200 Subject: [python-win32] Eventhandling with Intellicad Message-ID: Hello everybody, I am trying to do some eventhandling with win32com and Intellicad in python. I did write: import win32com.client import win32api import pythoncom,pywintypes import IntelliCAD import time from eventhandler import * icad_CLSID = '{77E49E57-976B-11CF-8CCB-00A0245B09EB}' defaultNamedOptArg=pythoncom.Empty defaultNamedNotOptArg=pythoncom.Empty defaultUnnamedArg=pythoncom.Empty icad_mod = win32com.client.gencache.EnsureModule(icad_CLSID, 0,1,0) icadapp = win32com.client.Dispatch('Icad.Application') workspace = win32com.client.DispatchWithEvents(icadapp.Workspace,IcadWorkSpaceEvents) doc = win32com.client.DispatchWithEvents(workspace.ActiveDocument,IcadDocumentEvents) newdoc = icadapp.Documents.Add() while True: pythoncom.PumpMessages() time.sleep(2) icadapp.Quit() I also tried the variant defining icadapp with DispatchWithEvents , but I do not get the workspace events except for the close event if I use the mouse while the loop is running. Doing equivalent code in Visual Basic works just fine. all events are catched. The document events are catched but the workspace events are not. I tried PumpWaitingMessages() but this jams the intellicad application, which will only resume after the python script ended. Does anyone have an idea to catch all events without jamming the application. Thank you for your support. Kind regards -- Dipl.-Ing. (FH) Johannes-Maria Frank Bildungsberater K?nigsberger-Str. 19b 76139 Karlsruhe Tel. +49(170) 3833849 e-mail: jmfrank63 at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From xuzhongjin at mychery.com Tue Oct 23 06:39:28 2012 From: xuzhongjin at mychery.com (=?gb2312?B?0OzW2b33?=) Date: Tue, 23 Oct 2012 12:39:28 +0800 Subject: [python-win32] (no subject) Message-ID: <001801cdb0d8$62f21830$28d64890$@com> Hi ladies/gentlemen, What I do now is based on Motorola Scan Bar Code SDK to do some development. SDK is COM thing. there are API Commands and API Events as they called. API Commands?? development is finished. But Events no, I tried, but failed. Could u give some help ~ ~. Thank you. from pythoncom import * from win32com.client import * drv = win32com.client.Dispatch("CoreScanner.CoreScanner",clsctx = CLSCTX_ALL) Then I can use the method/attribute, such as Open, Close and so on. Goooood. class LocalScanEvent: def OnBarcodeEvent(self, eventType=0, pscanData=pythoncom.Empty): print "@@@@@@@@@@@@" evt = = DispatchWithEvents("CoreScanner.CoreScanner", LocalScanEvent) Now prblem appears. I can??t get the LocalScanEvent work. When I debug the dispatch, it always go to BASECLASS. How could I do? Please help out. Thank you. P.S. BASECLASS ?C it is shows in attachment,?? class ICoreScanner(DispatchBaseClass):?? . Best regards, XU Zhongjin Electronic & Software Engineer Electronic & Control Department DERI CHERY No.8 Changchun Rd E&T Development Zone Wuhu Anhui China 241006 +86+553+5925245 +86+13355530465 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: DB07B9FC-18B0-4B55-9A44-31D2C2F87875x0x1x0.py URL: From le.dahut at laposte.net Wed Oct 24 16:40:23 2012 From: le.dahut at laposte.net (le dahut) Date: Wed, 24 Oct 2012 16:40:23 +0200 Subject: [python-win32] Python Service does not start at Windows boot but at user's logon In-Reply-To: <48500476.5030401@probo.com> References: <484D33C2.7080909@linbox.com> <058a01c8ca87$7b9b4c30$72d1e490$@com.au> <484F9570.2080107@linbox.com> <48500476.5030401@probo.com> Message-ID: <5087FDD7.9030009@laposte.net> This thread comes up when you search for information about this problem : "how to make my service start before logon screen appears". That's why I post this information here (this is not 4 years lag). I had found a solution for XP which was to add the service in a servicegroup called "NetworkProvider" : sc config myservice group= NetworkProvider On Vista/Seven just change the group name to "Network" : sc config myservice group= Network http://technet.microsoft.com/en-us/library/cc976063.aspx http://technet.microsoft.com/en-us/library/cc976127.aspx Note that "Network" group is not listed in SYSTEM\CurrentControlSet\Control\ServiceGroupOrder\List but it exists as there are some services (like RPCSS ;-) ) which have "Network" as "Group". Take a look at HKLM\SYSTEM\CurrentControlSet\Services\EventSystem. Hope this helps. Klaas On 11/06/2008 18:59, Tim Roberts wrote : > spoirot wrote: >> I totally agree with you. I have found another dependency to use : >> Themes, which is less heavy than RPCSS. >> This works, but it does not make exactly what I want. > > Plus, it is simply not an acceptable practice for you to change some > other service's dependencies. > > >> Indeed, I would like to set some values in a HKLM subkey >> at windows boot, in order that changes are effective as soon as a user >> logs in after boot sequence. > > Why? What are you really trying to do here? What you're describing > sounds like a perfect vector for malware and trojan horses. > > You can certainly have a domain login script that gets executed very > early in the login sequence. That's how most corporate environments > enforce their IT policies. > > >> In my case, >> registry values are well written, but changes aren't effective yet... >> So user needs to reboot. >> I tried to use the FlushKey() method from _winreg module in order to >> immediately write changes to registry. >> Changes are written, but not effective. I thought that user's login >> refreshed the registry, and then changes could >> have taken effect, but it seems not to be really the case. > > Which registry entries are you changing? Perhaps there is another way. > > >> Is there any other Python _winreg method that could force registry >> changes to become effective as soon as >> changes are written into the registry ? > > This is just not the right question. Any changes take effect > immediately, but if some other process has already read the value, > there's nothing you can do, unless there's a way to notify the other > process to re-read its settings. > From mhammond at skippinet.com.au Mon Oct 29 05:20:33 2012 From: mhammond at skippinet.com.au (Mark Hammond) Date: Mon, 29 Oct 2012 15:20:33 +1100 Subject: [python-win32] [ANN] pywin32 build 218 released. Message-ID: <508E0411.5020001@skippinet.com.au> Hi all, I'm happy to announce the release of pywin32 build 218. This release has addressed a number of issues with previous builds, has improved support for Python 3.3 and a number of new features - I've appended the change log at the end of this mail. Downloads are available at: https://sourceforge.net/projects/pywin32/files/pywin32/Build%20218/ For initial support (eg, to ask questions about the release etc), please contact this mailing-list (python-win32 at python.org). If you want to report a bug, please do so at https://sf.net/projects/pywin32. As always, thanks to everyone who contributed to this release, both in terms of code and reporting bugs to the tracker. Of particular note, Roger Upole contributed a huge number of fixes and enhancements for this release - thanks! Cheers, Mark Changes: * mapiutil.py GetPropTagName has been modified to return the fully qualified PT_UNICODE and PT_STRING8 type name. Added optional argument to override rawType default in GetMapiTypeName. (Nick Czeczulin) * Fix the count of replaced terms in Pythonwin's search/replace (rupole). * Fix obscure issues in the Pythonwin code browser and other uses of the "hierlist" widget (rupole). * Fix a crash using a COM "record" that holds an array (rupole). * Fix error return in win32gui.GetClassName (rupole). * Some misc fixed to win32timezone (Jason R. Coombs). * Some fixes to win32com gencache for Python 3.x (Tim Golden) * Fix ActiveScript exception hresults. * RegQueryValueEx now return an empty list for blank REG_MULTI_SZ (rupole via bug #3531456) * Add win32pdh.AddEnglishCounter (rupole via feature request #3529527) * Fix post_install script use of the registry (rupole via bug #3536122) * Python 3.3 version is built with VS2010. * win32com.shell - added function SHCreateStreamOnFileEx and interfaces IShellItem2, IEnumShellItems, IApplicationDocumentLists, IApplicationDestinations, ITaskbarList, IEnumObjects, IKnownFolder, IKnownFolderManager, IObjectArray, IObjectCollection, ICustomDestinationList, and IShellLibrary; enhance SHAddToRecentDocs. * win32com.propsys - Many Property System interfaces and functions added * pythoncom - added StgCreateStorageEx * win32com.client - Fix iteration of objects that don't declare an enumerator in their typelib Validate syntax of constants written to makepy generated files * win32file - Add GetFileInformationByHandleEx, ReOpenFile and OpenFileById, SetFileInformationByHandle. SetFileTime() has an extra param to allow UTC time to be specified. * win32api - Allow UpdateResource to remove a resource From gerard.blais at gmail.com Mon Oct 29 15:12:52 2012 From: gerard.blais at gmail.com (Gerard Blais) Date: Mon, 29 Oct 2012 10:12:52 -0400 Subject: [python-win32] Problem installing for Python 2.7, 32-bit: mc.exe not found Message-ID: I seem to be missing an executable: C:\Temp\pywin32-218>setup install Building pywin32 2.7.218.0 running install running build running build_py running build_ext Found version 0x600 in C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\SDKDDKVER.H building 'perfmondata' extension mc.exe -h win32\src\perfmon -r build\temp.win32-2.7\Release\win32\src\perfmon win32\src\perfmon\PyPerfMsgs.mc error: command 'mc.exe' failed: No such file or directory Any ideas? I found a site (http://www.filecrop.com/77798596/index.html) which points to http://mediafire.com/?1wyyjmz43nq that purported to have a downloadable mc.exe, but Microsoft Security Essentials apparently deletes it immediately. Gerry -- -------------- next part -------------- An HTML attachment was scrubbed... URL: From mail at timgolden.me.uk Mon Oct 29 21:54:19 2012 From: mail at timgolden.me.uk (Tim Golden) Date: Mon, 29 Oct 2012 20:54:19 +0000 Subject: [python-win32] Problem installing for Python 2.7, 32-bit: mc.exe not found In-Reply-To: References: Message-ID: <508EECFB.4020100@timgolden.me.uk> On 29/10/2012 14:12, Gerard Blais wrote: > I seem to be missing an executable: > > C:\Temp\pywin32-218>setup install > Building pywin32 2.7.218.0 > running install > running build > running build_py > running build_ext > Found version 0x600 in C:\Program Files\Microsoft > SDKs\Windows\v6.0A\include\SDKDDKVER.H > building 'perfmondata' extension > mc.exe -h win32\src\perfmon -r > build\temp.win32-2.7\Release\win32\src\perfmon > win32\src\perfmon\PyPerfMsgs.mc > error: command 'mc.exe' failed: No such file or directory > > Any ideas? I found a site (http://www.filecrop.com/77798596/index.html) > which points to http://mediafire.com/?1wyyjmz43nq that purported to have a > downloadable mc.exe, but Microsoft Security Essentials apparently deletes > it immediately. mc.exe is the Message Compiler: http://msdn.microsoft.com/en-us/library/windows/desktop/aa385638%28v=vs.85%29.aspx which is used to compile messages for the EventLogs. I appear to have it installed somewhere as I've just built the current hg tip of pywin32 against Python 2.7. It's certainly part of the Windows SDK. It doesn't appear (at a glance) to be part of the Visual Studio toolset. Did you particularly want to build your own pywin32? Otherwise, just grab one of the binaries from the sourceforge files page. TJG From gerard.blais at gmail.com Tue Oct 30 13:19:00 2012 From: gerard.blais at gmail.com (Gerard Blais) Date: Tue, 30 Oct 2012 08:19:00 -0400 Subject: [python-win32] python-win32 Digest, Vol 115, Issue 14 In-Reply-To: References: Message-ID: <4656BAA5-F283-47A0-8A49-3C0195FDB018@gmail.com> I had the Enthought free Python distribution. I uninstalled, rebooted, and re- installed. That seems to have fixed everything. Thanks! Sent from my iPad On Oct 30, 2012, at 7:00 AM, python-win32-request at python.org wrote: > Send python-win32 mailing list submissions to > python-win32 at python.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://mail.python.org/mailman/listinfo/python-win32 > or, via email, send a message with subject or body 'help' to > python-win32-request at python.org > > You can reach the person managing the list at > python-win32-owner at python.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of python-win32 digest..." > > > Today's Topics: > > 1. Problem installing for Python 2.7, 32-bit: mc.exe not found > (Gerard Blais) > 2. Re: Problem installing for Python 2.7, 32-bit: mc.exe not > found (Tim Golden) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 29 Oct 2012 10:12:52 -0400 > From: Gerard Blais > To: python-win32 at python.org > Subject: [python-win32] Problem installing for Python 2.7, 32-bit: > mc.exe not found > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > I seem to be missing an executable: > > C:\Temp\pywin32-218>setup install > Building pywin32 2.7.218.0 > running install > running build > running build_py > running build_ext > Found version 0x600 in C:\Program Files\Microsoft > SDKs\Windows\v6.0A\include\SDKDDKVER.H > building 'perfmondata' extension > mc.exe -h win32\src\perfmon -r > build\temp.win32-2.7\Release\win32\src\perfmon > win32\src\perfmon\PyPerfMsgs.mc > error: command 'mc.exe' failed: No such file or directory > > Any ideas? I found a site (http://www.filecrop.com/77798596/index.html) > which points to http://mediafire.com/?1wyyjmz43nq that purported to have a > downloadable mc.exe, but Microsoft Security Essentials apparently deletes > it immediately. > > > > > > Gerry > > > > -- > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > ------------------------------ > > Message: 2 > Date: Mon, 29 Oct 2012 20:54:19 +0000 > From: Tim Golden > To: Python-Win32 List > Subject: Re: [python-win32] Problem installing for Python 2.7, 32-bit: > mc.exe not found > Message-ID: <508EECFB.4020100 at timgolden.me.uk> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > On 29/10/2012 14:12, Gerard Blais wrote: >> I seem to be missing an executable: >> >> C:\Temp\pywin32-218>setup install >> Building pywin32 2.7.218.0 >> running install >> running build >> running build_py >> running build_ext >> Found version 0x600 in C:\Program Files\Microsoft >> SDKs\Windows\v6.0A\include\SDKDDKVER.H >> building 'perfmondata' extension >> mc.exe -h win32\src\perfmon -r >> build\temp.win32-2.7\Release\win32\src\perfmon >> win32\src\perfmon\PyPerfMsgs.mc >> error: command 'mc.exe' failed: No such file or directory >> >> Any ideas? I found a site (http://www.filecrop.com/77798596/index.html) >> which points to http://mediafire.com/?1wyyjmz43nq that purported to have a >> downloadable mc.exe, but Microsoft Security Essentials apparently deletes >> it immediately. > > mc.exe is the Message Compiler: > > > http://msdn.microsoft.com/en-us/library/windows/desktop/aa385638%28v=vs.85%29.aspx > > which is used to compile messages for the EventLogs. > > I appear to have it installed somewhere as I've just built the current > hg tip of pywin32 against Python 2.7. It's certainly part of the Windows > SDK. It doesn't appear (at a glance) to be part of the Visual Studio > toolset. > > Did you particularly want to build your own pywin32? Otherwise, just > grab one of the binaries from the sourceforge files page. > > TJG > > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > http://mail.python.org/mailman/listinfo/python-win32 > > > ------------------------------ > > End of python-win32 Digest, Vol 115, Issue 14 > *********************************************