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


Groups > comp.lang.python > #80618

Re: __missing__ for the top-level Python script

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'ideally': 0.04; 'subject:Python': 0.06; 'interpreter.': 0.07; 'anymore.': 0.09; 'badly': 0.09; 'exec': 0.09; 'occasionally': 0.09; 'subject:script': 0.09; 'worse': 0.09; 'yeah,': 0.09; 'cc:addr :python-list': 0.11; 'python': 0.11; 'wrote': 0.14; "wouldn't": 0.14; 'eat': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'imports': 0.16; 'subject:top': 0.16; 'thought.': 0.16; ':-)': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'else,': 0.19; 'thu,': 0.19; 'help.': 0.21; 'import': 0.22; 'cc:addr:python.org': 0.22; 'skip': 0.24; 'file.': 0.24; 'cc:2**0': 0.24; 'source': 0.25; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'chris': 0.29; 'am,': 0.29; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; 'that.': 0.31; '13,': 0.31; 'disabled': 0.31; 'stuff': 0.32; 'entirely': 0.33; 'subject:the': 0.34; "can't": 0.35; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'possible': 0.36; 'nov': 0.38; 'handle': 0.38; 'files': 0.38; 'pm,': 0.38; 'anything': 0.39; 'expect': 0.39; 'does': 0.39; '12,': 0.39; 'catch': 0.60; 'first': 0.61; 'back': 0.62; 'kind': 0.63; 'choose': 0.64; 'grab': 0.64; 'details': 0.65; 'life': 0.66; 'believe': 0.68; 'to:none': 0.92
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=9/4J5IO1Tpi6h9XITO9u156pZVe+y+PmiE4ppDQHToI=; b=eEP0q0JmZ0KKNt/YNOhqfb4b1X4BJ51bQfjtCDJB2WGlxOmOhBfsmryB5k+4HicRBU 2QanST/g69gCZ67ph2cEFrPI0CdXlNCnbogne+eFZJOYEFfttZFGiRwHwfYuDtEng8ZV zfYMio5JZJvW0hVeT+4SDGn9hFRtVpBAbsCRGLZconbC+oJ0HJcortVJp8z6lLs1HErk dPkMdxYCYZZUTSzf1T6YIF4xyfJkHT0U7cYOnPpowaOkeBsny3Hweq4dKjtV/Fkc+I9P B1f0Vi4ErRTH8peEBEY5fZKViylf2Gk/yy81VNC0gn8mUXJpfUAG9KlPE98iPS1IYOhI gNbw==
MIME-Version 1.0
X-Received by 10.107.18.151 with SMTP id 23mr42377403ios.27.1415815958045; Wed, 12 Nov 2014 10:12:38 -0800 (PST)
In-Reply-To <CANc-5UwzcXC=syQZZw=kuwJEdh8eQxqRb0eOzgkwi8HkSymmKQ@mail.gmail.com>
References <CAPTjJmpVVfPzwrbeornk9Txyfiz+H5MDfHG2nY_9va7RCUEmEw@mail.gmail.com> <CAPTjJmrhz7crC2_x+ZN9sLgPvd8B1Yn8skzMSTBXJ6gSj55TqQ@mail.gmail.com> <CANc-5UybJQu+QgUrL-kS4XUH5iQHHuWJfaqDu-y00PcvszY5PQ@mail.gmail.com> <CAPTjJmrikcja8MbhgwmHvFDdgigQaHwsYo+tLR5q6OLfhPHcJQ@mail.gmail.com> <CANc-5UwzcXC=syQZZw=kuwJEdh8eQxqRb0eOzgkwi8HkSymmKQ@mail.gmail.com>
Date Thu, 13 Nov 2014 05:12:37 +1100
Subject Re: __missing__ for the top-level Python script
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.15734.1415815966.18130.python-list@python.org> (permalink)
Lines 25
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1415815966 news.xs4all.nl 2926 [2001:888:2000:d::a6]:60548
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:80618

Show key headers only | View raw


On Thu, Nov 13, 2014 at 5:09 AM, Skip Montanaro
<skip.montanaro@gmail.com> wrote:
> On Wed, Nov 12, 2014 at 12:49 PM, Chris Angelico <rosuav@gmail.com> wrote:
>> Interesting data point there - that you actually have it handy and
>> choose not to use it.
>
> And, I believe I wrote it. Can't have a worse recommendation than
> that. A cook who doesn't eat his own cooking. :-) I think I disabled
> its import sometime in the distant past when it interacted badly with
> something else, but for the life of me, I can't remember the details
> anymore.

It doesn't ideally handle loops, as it'll go back to the top of the
loop - that was my first thought. As it has to go and exec stuff all
over again, it's entirely possible it'll have other issues.

> I will occasionally paste functions from Python source files into the
> interactive interpreter. This autoload functionality can be kind of
> handy there so you don't have to go back and also grab the imports
> from the top of the source file.

Yeah, that does help. Of course, it can't handle a from import, but I
wouldn't expect anything to catch those.

ChrisA

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


Thread

Re: __missing__ for the top-level Python script Chris Angelico <rosuav@gmail.com> - 2014-11-13 05:12 +1100

csiph-web