getting local area connection information through python in windows

Discussion in 'Python' started by moijes12, May 22, 2010.

  1. moijes12

    moijes12 Guest

    Hi

    I need to get the details of Local Area connection information(network
    interface) like packets sent,packets recieved,duration etc. I have to
    do this in Windows using python.

    I tried looking under the socket module and also googling,but did not
    find anything that I could use for windows,though I did find something
    for linux.I have to somehow use the socket module for this.

    Please help me in cracking this.

    Regards
    Moses
    moijes12, May 22, 2010
    #1
    1. Advertising

  2. moijes12

    moijes12 Guest

    Re: getting local area connection information through python inwindows

    On May 22, 1:12 pm, sturlamolden <> wrote:
    > On 22 Mai, 09:38, moijes12 <> wrote:
    >
    > > I need to get the details of Local Area connection information(network
    > > interface) like packets sent,packets recieved,duration etc. I have to
    > > do this in Windows using python.
    > >>> import subprocess as sp
    > >>> p = sp.Popen("netstat -s", shell=False, bufsize=4096,

    >
    >               stdin=sp.PIPE, stdout=sp.PIPE, stderr=sp.PIPE)
    >
    > >>> print ''.join(p.stdout.readlines())
    > >>> p.terminate()

    >
    > There are other switches for the netstat command as well.


    Thanks
    Moses
    moijes12, May 22, 2010
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    659
  2. Mark
    Replies:
    1
    Views:
    574
    Larry Barowski
    Jun 27, 2005
  3. Astan Chee
    Replies:
    1
    Views:
    297
    Justin Ezequiel
    Mar 16, 2007
  4. Replies:
    1
    Views:
    148
    Christopher Reed
    Apr 4, 2006
  5. Replies:
    0
    Views:
    128
Loading...

Share This Page