Re: [python-win32] Getting Network Information/Statistics

2008-01-24 Thread Paul Koning
> "Alexander" == Alexander Belyaev <[EMAIL PROTECTED]> writes: Alexander> I am new to python and so far could not figure out what Alexander> 'tp' means in the following? >>tp,val = win32pdh.GetFormattedCounterValue( hc, win32pdh.PDH_FMT_LONG ) >>print hex(tp),val I don't know tha

Re: [python-win32] Getting Network Information/Statistics

2008-01-24 Thread Tim Roberts
Alexander Belyaev wrote: > I am new to python and so far could not figure out what 'tp' means in > the following? > > Thanks, > Alexander > > tp,val = win32pdh.GetFormattedCounterValue( hc, > win32pdh.PDH_FMT_LONG ) > print hex(tp),val > The PdhGetFormattedCounterValue API has two o

Re: [python-win32] Getting Network Information/Statistics

2008-01-24 Thread Alexander Belyaev
i.EnumWindows (callback, hwnds) >return hwnds > > if __name__ == '__main__': >notepad = subprocess.Popen ([r"notepad.exe"]) ># ># sleep to give the window time to appear ># > time.sleep (2.0) > >for hwnd in get_hwnds_for_pi

Re: [python-win32] Getting Network Information/Statistics

2008-01-23 Thread Tim Roberts
>.> wrote: > - Original Message - > Tim Roberts wrote: > > >> Now, you know that "Current Bandwidth" is not what you want, right? >> This just shows it is a 100Mbit connection. >> > > Yes I am, win32pdhutil.browse() won't report anything for Bytes Received, > Sent, or Total so I

Re: [python-win32] Getting Network Information/Statistics

2008-01-23 Thread >.>
- Original Message - Tim Roberts wrote: > Now, you know that "Current Bandwidth" is not what you want, right? > This just shows it is a 100Mbit connection. Yes I am, win32pdhutil.browse() won't report anything for Bytes Received, Sent, or Total so I used Current Bandwidth. > It's a 32

Re: [python-win32] Getting Network Information/Statistics

2008-01-23 Thread Tim Roberts
>.> wrote: > That works for XP but not Vista, I guess M$ changed the API in Vista. > Oh by the way I mean to write win32pdhutil.browse() earlier. Thanks > for the help. > I didn't run it as admin in Vista before so I gave your script a try. > The output from your script as run in vista by admini

Re: [python-win32] Getting Network Information/Statistics

2008-01-23 Thread >.>
That works for XP but not Vista, I guess M$ changed the API in Vista. Oh by the way I mean to write win32pdhutil.browse() earlier. Thanks for the help. I didn't run it as admin in Vista before so I gave your script a try. The output from your script as run in vista by administrator follows: [code]

Re: [python-win32] Getting Network Information/Statistics

2008-01-23 Thread Tim Roberts
>.> wrote: > I got the interface name from win32util.browse() in Vista and XP. I > think XP is Giving me the wrong number because it differs from what > I'm reading in perfmon everytime and it seems to be counting down from > that number after every subsequent call. > ex: perfmon will give me a

Re: [python-win32] Getting Network Information/Statistics

2008-01-23 Thread Tim Golden
>.> wrote: > I got the interface name from win32util.browse() in Vista and XP. I think XP > is Giving me the wrong number because it differs from what I'm reading in > perfmon everytime and it seems to be counting down from that number after > every subsequent call. > ex: perfmon will give me a la

[python-win32] Getting Network Information/Statistics

2008-01-22 Thread >.>
I got the interface name from win32util.browse() in Vista and XP. I think XP is Giving me the wrong number because it differs from what I'm reading in perfmon everytime and it seems to be counting down from that number after every subsequent call. ex: perfmon will give me a last of 0.0 and win32pd

Re: [python-win32] Getting Network Information/Statistics

2008-01-22 Thread Tim Roberts
sai rabbit wrote: > I want to get bytes sent and received in total and by each application > if possible. I tried winpdh and winpdhutil but it reports the wrong > number for Received in XP and doesn't seem to work for network stats > in Vista: > > [code] > >>> import win32pdh > >>> intf = 'Intel

[python-win32] Getting Network Information/Statistics

2008-01-22 Thread sai rabbit
I want to get bytes sent and received in total and by each application if possible. I tried winpdh and winpdhutil but it reports the wrong number for Received in XP and doesn't seem to work for network stats in Vista: [code] >>> import win32pdh >>> intf = 'Intel[R] PRO_100 Network Connection' >>>