Re: [python-win32] How to get PID from a Proces Handle ?

2006-10-12 Thread Metz, Bobby W, WWCS
You should consider using the new subprocess module. It provides both phandle and pid. You can confirm this using EnumWindows and win32process.GetWindowThreadProcessId. The value returned by .pid is the same as that from GetWindowThreadProcessId. ._handle is the same as that returned by spawnv,

Re: [python-win32] Python.AXScript (win32com) in Netstumbler

2006-10-12 Thread sam lee
On 10/12/06, Mark Hammond <[EMAIL PROTECTED]> wrote: > Try: > > def NetStumbler_OnScanResult(SSID,BSSID,CapFlags,Signal,Noise,LastSeen): >... > > I think the above is similar to VBScript - at least it was when the AXScript > support was written :) > > Mark > > That doesn't do. I tried with __

Re: [python-win32] How to get PID from a Proces Handle ?

2006-10-12 Thread Scott Hogsten
I tried a bunch of stuff yesterday but couldn't get a good solution. It doesn't appear that MS gives a good way for a process to return it's PID. I ended up wrapping the program under test in C and using that to dump the PID to disk. Scott - Original Message From: Mark Hammond <[EMAIL

Re: [python-win32] How to get PID from a Proces Handle ?

2006-10-12 Thread Tim Golden
[Mark Hammond] | Sent: 12 October 2006 12:19 | To: 'Scott Hogsten'; python-win32@python.org | Subject: Re: [python-win32] How to get PID from a Proces Handle ? | | > I have some code that spawns processes using the "spawnv" | > command this returns a process handle. | > Can I use the process handl

Re: [python-win32] Python.AXScript (win32com) in Netstumbler

2006-10-12 Thread Mark Hammond
> So, NetStumbler will call NetStumbler.OnScanResult on some events. > I want to override that: Try: def NetStumbler_OnScanResult(SSID,BSSID,CapFlags,Signal,Noise,LastSeen): ... I think the above is similar to VBScript - at least it was when the AXScript support was written :) Mark ___

Re: [python-win32] Python.AXScript (win32com) in Netstumbler

2006-10-12 Thread sam lee
On 10/12/06, Mark Hammond <[EMAIL PROTECTED]> wrote: > PlaySound will be a method on a "global" object. Due to the way Python > works, it is difficult to always make these methods truly global - hence in > ASP, you need, eg, 'Response.Write' rather than the plain 'Write' other > languages offer.

Re: [python-win32] How to get PID from a Proces Handle ?

2006-10-12 Thread Mark Hammond
> I have some code that spawns processes using the "spawnv" > command this returns a process handle. > Can I use the process handle to retrieve the actual PID of > the process ? This is part of a test harness > and I need to be able have the actual PID to use against some output. Good question! I