Newbie question: what is causing my socket error?
Peter Hansen
peter at engcorp.com
Tue Jun 15 00:25:35 EDT 2004
google account wrote:
> The code in the library at line 254 is
>
> addr = socket.gethostbyname(socket.gethostname())
>
> which would kinda support my theory about name resolution, but not
> help me resolve the error.
Can you just try executing those two expressions individually,
starting with socket.gethostname(), at the interactive prompt,
to see what you get?
This doesn't seem to have anything to do with smtplib, so don't
complicate your life with it...
>>> import socket
>>> socket.gethostname()
'monolith'
>>> socket.gethostbyname(_)
'192.168.0.197'
on my machine....
-Peter
More information about the Python-list
mailing list