sockets, gethostname() changing
7stud
bbxx789_05ss at yahoo.com
Thu May 24 23:50:33 EDT 2007
Thanks for the response.
On May 24, 9:24 pm, half.ital... at gmail.com wrote:
> I can't imagine why your hostname would be changing, unless you
> installed some of their proprietary software thats messing around with
> things.
When I first started using Terminal, I noticed that the prompt in
Terminal changed when I was connected to the internet.
> What is the hostname set to in Sys Prefs->Sharing?
My Name's Computer
> Try
> setting it there. What are the before and after connection names you
> get?
>
If I add the line:
host = socket.gethostname()
print host #<----------
and I'm not connected to the internet and I run the program, I get:
my-names-computer.local
When I'm connected to the internet, I get:
dialup-9.999.999.999.dial9.xxxxxxx.level9.net
More information about the Python-list
mailing list