473,408 Members | 1,786 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

How to list the ip address of the computers connected to my computer

Hi all,

I am a python newbie. I am trying to query the network to see the ip address of the computers connected to my computer. I googled a lot but I could not find some simple methods for solving it.
Any simple sample scripts and advices will be of great help to me to learn python.

Thanking you.
Nov 8 '10 #1
1 4183
I think that you can embed a piece of batch, that would be netstat -a

The code will be something like this:
Expand|Select|Wrap|Line Numbers
  1. from os import system
  2. os.system('netstat -a')
  3.  
  4. #And if you want to write it in a txt you can do:
  5. s=open('hellothere.txt', 'w')
  6. s.write(os.system('netstat -a'))
  7. s.close()
Nov 16 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Lucky | last post by:
hi there!!! very much newbie to socket progammin in .net. i've try the DNS class to get the ip addresses but it always returns 1 ip that of my pc though i got 50 PCs connected to the LAN. i tried...
1
by: Lloyd Taylor | last post by:
Hello, I have a simple bit of code which I have found in the forums which lists all the computer(s) in a domain. The code is: DirectoryEntry domainEntry = new...
3
by: Steve | last post by:
Hi all How would i get a list of all Active Computers on a network? All I need are the computer names. Kind Regards, Steve.
1
by: Bilge TUTAK | last post by:
Hi, I want to find the list of the computer names in a workgroup or in a domain. Is there a way to do this in VB.NET? Thanx
3
by: newsgroups.jd | last post by:
Im sure there is a better way to do this - just posting what I did to get it to work. Please feel free to comment with suggestions - this was my first vb.net program and I am not a programmer,...
10
by: Progman | last post by:
How do you get the IP address of a computer using ASP.net? I tried Request.UserHostAddress and it does not work. I get Request for the permission of type...
11
by: jellychai | last post by:
I'm doing the final year project that related to the SNMP. I need to find the solution for the IP auto detection in C#. When I run the main project, the program can automatically detect the IP for...
5
xxoulmate
by: xxoulmate | last post by:
get list of ip or computer names on a specified workgroup., is there any api that can list down that.
7
by: orr1968 | last post by:
how do i find the ip address of my computer can someone pm me the ip address
0
by: pawan tiwari | last post by:
please tell me the code for finding ip address of remote computer by its computer name
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.