jblazi at hotmail.com
Thu Oct 2 21:28:46 CEST 2003
On Thu, 02 Oct 2003 13:56:59 -0400, Peter Hansen wrote:
> jblazi wrote:
>> First I wanted to write my own course but the official
>> tutorial is virtually perfect. The first program we shall write is a
>> mastermind program and it would be nice if my pupils could play that over
>> the internet too. The first point is that they have not permanent ip
>> numbers so the ip number has to be found out first.
> Most programs don't try to figure out the IP address of the machine on which
> they are running. Instead, they require the IP address of the *other* machine
> to which they will talk. For that, you could just have the students type
> "ipconfig" at a command line and save yourself the trouble. As others have
> pointed out, in many situations, probably such as would always exist at a
> school, machines on the network are not given "routable" (public) IP addresses
> and you couldn't connect to them from the Internet anyway.
> Another approach is to have a central server which handles the match-making
> process. Then the only thing needed is the address of that server.
> My suggestion is you cut scope and skip this whole aspect, and just
> assume the address information is available externally to the program.
> That's how 99.9% of similar software works.
So I shall do this. When I call ipconfig, I see two ip adresses:
IP-Adresse (Autokonfig.). . . . . : xxx.xxx.xxx.xxx
Subnetzmaske. . . . . . . . . . . : xxx.xxx.0.0
Standardgateway . . . . . . . . . :
IP-Adresse. . . . . . . . . . . . : xxx.xxx.xxx.xxx
Subnetzmaske. . . . . . . . . . . : 255.255.255.255
Standardgateway . . . . . . . . . : xxx.xxx.xxx.xxx
Python returns the first ip number but I should need the second one. (I
replaced the digits by 'x'.
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
More information about the Python-list