Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #97822

Re: teacher need help!

References (2 earlier) <CANy1k1iq-9K_D+iVUW4ErFF5QvByH3r+WMVyHdq2Mrr9nbeNhg@mail.gmail.com> <BLUPR0201MB1524A5C40F14DD282BA0A379D63A0@BLUPR0201MB1524.namprd02.prod.outlook.com> <5624AC43.3080105@timgolden.me.uk> <BLUPR0201MB152436CF782EE8404D5B16A0D63A0@BLUPR0201MB1524.namprd02.prod.outlook.com> <n03a2q$6d1$1@ger.gmane.org>
Date 2015-10-20 10:03 +1100
Subject Re: teacher need help!
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.44.1445295829.878.python-list@python.org> (permalink)

Show all headers | View raw


On Tue, Oct 20, 2015 at 4:42 AM, jmp <jeanmichel@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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: teacher need help! Chris Angelico <rosuav@gmail.com> - 2015-10-20 10:03 +1100

csiph-web