[python-win32] process creation ID returned as a string, not
an int
Tim Golden
tim.golden at viacom-outdoor.co.uk
Mon Oct 20 04:11:18 EDT 2003
> -----Original Message-----
> From: Ray Pasco [mailto:pascor at hotpop.com]
> Sent: 17 October 2003 22:29
> To: python-win32 at python.org
> Subject: [python-win32] process creation ID returned as a
> string, not an
> int
>
> When creating a process and saving the returned ID,
> sometime this value is an integer and sometimes
> it is a string !
With no particular insight on this, experimentation on my Win2K
box shows that the id is neither an int nor a string, but rather
an instance of an ISWbemProperty class. This class, if you're interested:
>>> print id.__class__
win32com.gen_py.565783C6-CB41-11D1-8B02-00600806D9B6x0x1x1.ISWbemProperty.IS
WbemProperty
I'll have a go on a Win98 box later today if I get the chance just
to see if it's any different.
To ask a question that goes beyond the immediate problem, though,
what are you trying to do with the return value? All I ever do is
stash it away in some local or class variable so that I can
refer to the process later, eg to terminate it. In that case, I
don't care whether it's an int or a string or anything else: I just
pass it back in to a WMI query. What are you using it for?
TJG
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
More information about the Python-win32
mailing list