try<br> s=smtplib.SMTP('127.0.0.1')<br><br>instead.  I'm guessing that it's trying to bind to the IPv6 or some other non IPv4 localhost instance.<br><br><div class="gmail_quote">On Wed, Mar 18, 2009 at 11:25 AM, cassiope <span dir="ltr"><<a href="mailto:fpm@u.washington.edu">fpm@u.washington.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">A hard drive failure forced me to rebuild my main system.  Just a few<br>
things haven't been restored; one of them is a python script which is<br>
used to email users of important events.<br>
<br>
In attempting to diagnose the cause, I tried directly executing the<br>
lines inside the python2.5 interpreter:<br>
<br>
        import  smtplib<br>
        s= smtplib.SMTP('localhost')<br>
<br>
but the second line causes  a traceback:<br>
<br>
        File "<stdin>", line 1, in <module><br>
        File "/usr/lib/python2.5/smtplib.py", line 244, in __init__<br>
            (code, msg) = self.connect(host, port)<br>
        File "/usr/lib/python2.5/smtplib.py", line 310, in connect<br>
            raise socket.error, msg<br>
        socket.error: (97, 'Address family not supported by protocol')<br>
<br>
This is with exim4 and python2.5 on a newly installed lenny system.<br>
No error messages appear in /var/log or /var/log/exim4 directories.<br>
<br>
Helpful clues or pointers to relevant documentation would be<br>
appreciated!<br>
<br>
        -f<br>
<font color="#888888">--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>We are all slave to our own paradigm. -- Joshua Williams<br> <br>If the letters PhD appear after a person's name, that person will remain outdoors even after it's started raining. -- Jeff Kay<br>
<br>Fascism is a term used to describe authoritarian nationalist political ideologies or mass movements that are concerned with notions of cultural decline or decadence and seek to achieve a millenarian national rebirth by exalting the nation or race, and promoting cults of unity, strength and purity. - Wikipedia<br>
<br>The story of postwar American conservatism is best understood as a continual replay of a single long-standing debate. On one side are those who have upheld the Burkean ideal of replenishing civil society by adjusting to changing conditions. On the other are those committed to a revanchist counterrevolution, the restoration of America's pre-welfare state ancien regime. And, time and again, the counterrevolutionaries have won. The result is that modern American conservatism has dedicated itself not to fortifying and replenishing civil society but rather to weakening it through a politics of civil warfare. -- Sam Tanenhaus<br>