query to find name of the OS, ip addr, mac addr etc

Discussion in 'Python' started by muttu2244@yahoo.com, Dec 14, 2005.

  1. Guest

    Hi all,

    1) Am working on windows XP, and is there any way i can get the whole
    name as "windows Xp" using python script?

    i have tried with
    "os.sys.platform" but it just gives me as "win32", but can
    i get the whole OS name as "windows Xp".

    If this is not possible, atleast i have a exe file, which puts all
    the information about the system on the desktop, like os name, ip addr,
    mac addr, etc etc, is there a way where i can collect this information
    (from exe file to a text file ) with python script, so that atleast
    that way i ll get the full OS name.

    2) How can i get the "ip address" of my system? using python script.

    3) How can i get the "mac address" of the system? using python script.

    4) And how can i get the my "computer name" ? using python script.

    Thanks in advance for having given a thought on my queries.

    regards
    yogi
    , Dec 14, 2005
    #1
    1. Advertising

  2. Roger Upole Guest

    If you have Pywin32 installed, you can use WMI to get all these details.
    The WMI classes to look at are win32_networkadapter and
    win32_operatingsystem.
    Roger

    --
    "Ask the ToeCutter - HE knows who I am !"

    <> wrote:
    > Hi all,
    >
    > 1) Am working on windows XP, and is there any way i can get the whole
    > name as "windows Xp" using python script?
    >
    > i have tried with
    > "os.sys.platform" but it just gives me as "win32", but can
    > i get the whole OS name as "windows Xp".
    >
    > If this is not possible, atleast i have a exe file, which puts all
    > the information about the system on the desktop, like os name, ip addr,
    > mac addr, etc etc, is there a way where i can collect this information
    > (from exe file to a text file ) with python script, so that atleast
    > that way i ll get the full OS name.
    >
    > 2) How can i get the "ip address" of my system? using python script.
    >
    > 3) How can i get the "mac address" of the system? using python script.
    >
    > 4) And how can i get the my "computer name" ? using python script.
    >
    > Thanks in advance for having given a thought on my queries.
    >
    > regards
    > yogi
    >




    ----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
    http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
    ----= East and West-Coast Server Farms - Total Privacy via Encryption =----
    Roger Upole, Dec 14, 2005
    #2
    1. Advertising

  3. gene tani Guest

    Re: query to find name of the OS, ip addr, mac addr etc

    wrote:
    > Hi all,
    >
    > 1) Am working on windows XP, and is there any way i can get the whole
    > name as "windows Xp" using python script?
    >
    > i have tried with
    > "os.sys.platform" but it just gives me as "win32", but can
    > i get the whole OS name as "windows Xp".
    >
    > If this is not possible, atleast i have a exe file, which puts all
    > the information about the system on the desktop, like os name, ip addr,
    > mac addr, etc etc, is there a way where i can collect this information
    > (from exe file to a text file ) with python script, so that atleast
    > that way i ll get the full OS name.
    >
    > 2) How can i get the "ip address" of my system? using python script.
    >
    > 3) How can i get the "mac address" of the system? using python script.
    >
    > 4) And how can i get the my "computer name" ? using python script.
    >
    > Thanks in advance for having given a thought on my queries.
    >
    > regards
    > yogi


    win32 version, computer name: look in platform.system(), release,
    win32_ver and uname

    mac addr: if it's avail, it's in WMI:
    http://tgolden.sc.sabren.com/python/wmi.html

    ip:
    import socket; s=socket.socket()
    s.connect((yourserver,yourport))
    s.getsockname()
    gene tani, Dec 14, 2005
    #3
    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. steve
    Replies:
    3
    Views:
    1,425
    Mike Treseler
    Sep 4, 2003
  2. fpgawizz

    not able to write to addr loc x0

    fpgawizz, Apr 2, 2005, in forum: VHDL
    Replies:
    1
    Views:
    432
    info_
    Apr 2, 2005
  3. DaBeef
    Replies:
    0
    Views:
    341
    DaBeef
    Nov 2, 2005
  4. Kevin Walzer

    Re: PIL (etc etc etc) on OS X

    Kevin Walzer, Aug 1, 2008, in forum: Python
    Replies:
    4
    Views:
    374
    Fredrik Lundh
    Aug 13, 2008
  5. ara.t.howard

    mac addr determination

    ara.t.howard, Jul 3, 2007, in forum: Ruby
    Replies:
    26
    Views:
    272
    ara.t.howard
    Jul 3, 2007
Loading...

Share This Page