[Python-Dev] 2.3rc2 IDLE problems on a Win2000sp3 box

Alex Martelli aleaxit@yahoo.com
Sat, 26 Jul 2003 18:49:57 +0200


On Saturday 26 July 2003 18:22, Kurt B. Kaiser wrote:
   ...
> > Python subprocess socket error: Connection refused, retrying....
> >
> > Python subprocess socket error: Connection refused, retrying....
> >
> > Python subprocess socket error: Connection refused, retrying....
> >
> > Connection to Idle failed, exiting.
>
> If he got this far, the GUI process was able to set up a listening
> socket on 127.0.0.1 / 8833 but the subprocess was not able to make a
> connection to it.  I have seen this problem in the past when a crashed
> IDLE GUI process was left listening on 8833.  Please have him check
> the task manager, there should be only two pythonw.exe running in W2K.
> Sorting the task manager on the first column helps to see this.

Sorry, I was translating only a part of the very copious information I
exchanged (in Italian) with that user.  He IS quite aware that a pythonw.exe
process may often be left hanging for one reason or another and on all
attempts has been careful to terminate all python.exe and pythonw.exe
processes.


> > *HOWEVER* IDLE runs fine IF he starts it while connected to
> > the internet!  This clearly points to a configuration/installation
> > problem with his Win2000 SP3 box
>
> Please define "connected to the internet".  Does it mean plug in
> the RJ-45?  What exactly does he do to "disconnect"?  Are reboots
> involved?

Nope.  It's a Windows functionality that in the Italian versions of
Windows is called "Connessione Remota" (and I don't have a US
version of Windows at hand to check how it's called there): connects
your machine to the net via your modem and your ISP, by dialing out
and handshaking appropriately (normally with PPP, I believe) etc.
The icon/Start menu entry to activate this is labeled something like
"Connect to the Internet" (or the Italian translation thereof), so it
seems quite reasonable for Windows users to call it similarly.

> (He should upgrade his box, there is a critical buffer overflow hole
> in Direct X announced a couple of days ago.  It would also be
> interesting to see if SP4 etc. fixes the problem.)

OK, I'll let him know.  My hypothesis is that any good reinstall &
config of his box will fix HIS problem (he needs a loopback interface
adapter, if I recall WIndows terms correctly) but that's not the
gist of the problem.  How many thousands of Windows users will
have machines that only support sockets when "connected to
the internet" (dialed out), or personal firewalls that don't know that
localhost is safe to connect to (as Tim Peters reported), etc?  Helping
that Italian user fix his own problem won't help those thousands...


> > (typical newbies won't THINK of running idle.pyw at the prompt,
> > they'll keep banging on icons and getting silent failure as a
> > result),
>
> Well, this is the key point.  Things can and no doubt will go wrong,
> many of them beyond the control of IDLE or Python.  It's desirable to
> let the user know what's going on if possible and not leave him
> "banging the icons"  :-)

Right.  In other words you seem to second Aahz's suggestion of
some dialog the first time IDLE is started -- I've seen Anna second
(third?) it too, and I'll fourth it -- yes, adding code so late is quite
unpleasant, but if we don't this is going to be a black eye for the
reputation of Python 2.3 among the unwashed masses, IMHO.

> > opened happily, and I have no Win/2000 box to try things on.
>
> I can't see it on W2K / SP4 or XP Pro 2002 / SP1 but I need to
> know what "disconnect from the internet" means.

I'm pretty sure it means "hang up the remote-connection to the
ISP" and that it will give no problem on a well-configured machine.

> This would involve having the subprocess open a Tk window with
> the error message.   I'll take a look at it.  However, I'm going
> to be away for a couple of days starting this afternoon.

At least an error message that's user readable would be better
than nothing, though it won't help with the personal firewall side
of things.


Alex