Hey,

This will get your IP address:

#######Code########
print socket.gethostbyaddr(socket.gethostname())
('compname', [], ['192.168.1.2'])
########End Code########

If you are wanting to to communicate over the internet you will have 
to get the IP of you rounter. So you will have to either find a way to 
talk to your router or try and use an online service like these other 
guys suggest.

On Jan 28, 9:54 am, Scripter47 <[EMAIL PROTECTED]> wrote:
> How do i get my ip address?
>
> in cmd.exe i just type "ipconfig" then it prints:
>       ...
>       IP-address . . . . . . . . . . . . . . . . . : 192.168.1.10
>       ...
> how can i do that in python??

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to