[Tutor] (no subject)

Andrew P grouch at gmail.com
Mon Oct 31 19:40:06 CET 2005

If I'm not mistaken, that's the Pythonwin debugger spitting messages
to the interactive prompt.  I just used it to step through your your
games framework example :)

Being the first time I'd used any Python debugger, it didn't occur to
me that the look of it was non-standard.

I actually got the same exceptions popping up running his code, even
after fixing the problems I pointed out.  I figured the debugger shows
caught exceptions.  I noticed it before and hadn't given it much
thought, but looking at his code, there are try/except pairs in all
the spots the debugger highlighted:

from ftplib:

    import SOCKS; socket = SOCKS; del SOCKS # import SOCKS as socket
    from socket import getfqdn; socket.getfqdn = getfqdn; del getfqdn
except ImportError:
    import socket

from os.py:

def _get_exports_list(module):
        return list(module.__all__)
    except AttributeError:
        return [n for n in dir(module) if n[0] != '_']

and socket.py:

    import _ssl
    from _ssl import *
    _have_ssl = True
except ImportError:

Thats why I suspect that this:

File "c:\temp\ftp_put_hub.py", line 9, in ?
    ftp = ftplib.FTP('ftp.website.com')   # connect to host, default port

Was the only real error being thrown.

On 10/31/05, Alan Gauld <alan.gauld at freenet.co.uk> wrote:
> > When I ran in debugger, calling the FTP library invokes a no SOCKS
> > module error that the ftplib seems to be trying to access.
> Can you tell us which debugger you are using? I don't recognise what's
> going on here.
> >>> --Call--
> This looks like the Python interactive prompt,
> but whats the --Call-- thing?
> Its not valid Python syntax and yet the messages below suggest
> that it is being processed in a semi-sane way.
> [Dbg]>>> Traceback (most recent call last):
> And I don;t recognise the square brackets [Dbg] either.
> Which debugger is it?
> Finally given the number of import errors I'd suggest there is a path
> problem somewhere. But without knowing which OS, which IDE
> and where/how you are executing this I can only guess.
> Alan G.
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor

More information about the Tutor mailing list