teacher need help!

Chris Angelico rosuav at gmail.com
Mon Oct 19 19:03:45 EDT 2015


On Tue, Oct 20, 2015 at 4:42 AM, jmp <jeanmichel at sequans.com> wrote:
> import turtle
>
> print turtle.__file__
>
> may help you find the offending file.
>
> jm

In general, yes. Sadly, that technique doesn't work when the file
attempts to import itself, and then errors out; your driver script
will simply get an ImportError. (That said, though: The ImportError
will include the traceback that gives the file name. But that's no
different from what we already know.)

ChrisA



More information about the Python-list mailing list