[python-win32] Trouble running profiler

Mark Hammond mhammond at skippinet.com.au
Tue Apr 5 01:10:58 CEST 2005

I'm afraid I haven't recently used the profiler with win32com.  I have
recently used hotshot (which works quite well), but not with
"win32com.client.dynamic" objects.  I've no idea where that error is coming

I'm not sure of the real issue, but I do note that the problem occurs when
building "dynamic" information for the object.  Try running makepy first -
this could be as simple as using win32com.client.gencache.EnsureDispatch()
instead of a simple Dispatch.  That should avoid the failing code (and
hopefully not just find something else that fails).


> -----Original Message-----
> From: python-win32-bounces at python.org
> [mailto:python-win32-bounces at python.org]On Behalf Of Christopher
> Brichford
> Sent: Tuesday, 5 April 2005 3:29 AM
> To: python-win32 at python.org
> Subject: [python-win32] Trouble running profiler
> 	I'm try to run the profiler on a program that uses
> win32com.client to
> access the Msxml2.DOMDocument COM class to load an XML document.  I
> have attaced the stack trace I get when I run:
> python.exe -m profile profileTest.py
> I have also attached profileTest.py.  The profiler seems to work fine
> on programs that don't use win32com.client.  Has anyone seen this
> problem before?
> For those of you who are curious as to why I'm using the microsoft xml
> parser:
> The xml files I'm reading were created by a microsoft product and
> contain newline characters in attribute values.  xml.dom.minidom
> converts the newlines in the attribute values to reqular spaces.  It
> is important that these new line characters are preserved.  I
> discovered that the microsoft xml parser preserves new line characters
> in an element's attribute value so I started using the win32com.client
> stuff to get at microsoft's xml parser.
> Thanks in advance,
> Christopher Brichford
> Acrobat Engineering
> Adobe Systems Inc.

More information about the Python-win32 mailing list