Path: csiph.com!au2pb.net!feeder.erje.net!1.eu.feeder.erje.net!bcyclone01.am1.xlned.com!bcyclone01.am1.xlned.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'though:': 0.07; 'turtle': 0.07; 'subject:help': 0.07; 'cc:addr:python-list': 0.09; 'importerror': 0.09; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'jmp': 0.16; 'wrote:': 0.16; 'driver': 0.18; 'subject:need': 0.18; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'file.': 0.22; 'am,': 0.23; 'errors': 0.23; 'import': 0.24; 'header:In-Reply-To:1': 0.24; 'script': 0.25; "doesn't": 0.26; 'message-id:@mail.gmail.com': 0.27; 'said,': 0.27; 'itself,': 0.29; 'print': 0.30; 'traceback': 0.33; 'tue,': 0.34; 'file': 0.34; 'gives': 0.35; 'received:google.com': 0.35; 'but': 0.36; 'subject:: ': 0.37; 'your': 0.60; '(that': 0.63; 'different': 0.63; '20,': 0.66; 'chrisa': 0.84; 'to:none': 0.91; 'technique': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=GU9kjAarNBdKS5ZnTHNpBDufQWcflKzeT2g3hV+0yfY=; b=Umfj0WzDtB4/o/BSx80P81EnluswbP1h7vKfKprkHqkMBR7Y2zBihvogbuW4IA61Uk IVVkzvb+rG7sBWq33I0ZlZos/2lAGj9PQblCyYlXmiDTED2ULxZyZ/1SwyvCcrxtMqwW wA/AdD1rx19oNehFzhd9cLDNN01/vPwo2BN6w+oFb3BDTtJ5WwIY2zlFZllg9esc+Mm/ +8NIwFkyo/Sf8jqsezjCPg5T6kKgsx23G2hj1T3sRQMKmFKjFpPmDbdwTOBcds2dNzIf fT3XOlNwRQUFbro78zzpw8Of2XDJevMGIlPWW47chJrzUTRm9Md2Tb9vESUH86hEWV+Z w+Sw== MIME-Version: 1.0 X-Received: by 10.107.137.167 with SMTP id t39mr457232ioi.19.1445295825467; Mon, 19 Oct 2015 16:03:45 -0700 (PDT) In-Reply-To: References: <5623397C.40205@timgolden.me.uk> <5624AC43.3080105@timgolden.me.uk> Date: Tue, 20 Oct 2015 10:03:45 +1100 Subject: Re: teacher need help! From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 16 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1445295829 news.xs4all.nl 23722 [2001:888:2000:d::a6]:56049 X-Complaints-To: abuse@xs4all.nl X-Received-Bytes: 3806 X-Received-Body-CRC: 2407869545 Xref: csiph.com comp.lang.python:97822 On Tue, Oct 20, 2015 at 4:42 AM, jmp 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