Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #95224
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!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.002 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'mrab': 0.05; 'source.': 0.05; 'cc:addr:python-list': 0.09; 'stored': 0.10; 'python': 0.10; 'extensions': 0.13; 'file,': 0.15; 'interpreter': 0.15; '1:48': 0.16; 'dlls': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'wrote:': 0.16; 'module,': 0.18; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'aug': 0.20; 'extension': 0.20; '(on': 0.22; 'deployed': 0.22; 'am,': 0.23; 'bit': 0.23; "haven't": 0.24; 'import': 0.24; 'implemented': 0.24; 'header:In-Reply-To:1': 0.24; 'all.': 0.24; 'module': 0.25; "i've": 0.25; 'earlier': 0.27; 'message-id:@mail.gmail.com': 0.27; 'idea': 0.28; 'path,': 0.29; "people's": 0.29; 'there!': 0.29; 'windows,': 0.29; "i'm": 0.30; 'anywhere': 0.30; 'that.': 0.30; "i'd": 0.31; 'probably': 0.31; '"the': 0.32; 'point': 0.33; 'tue,': 0.34; 'file': 0.34; 'received:google.com': 0.35; 'quite': 0.35; 'something': 0.35; 'but': 0.36; 'there': 0.36; 'loaded': 0.36; 'subject:: ': 0.37; 'say': 0.37; 'where': 0.40; 'some': 0.40; 'easy': 0.60; 'care': 0.60; 'special': 0.73; 'miss': 0.77; 'chrisa': 0.84; 'precompiled': 0.84; 'to:none': 0.91; 'spell': 0.91; 'from.': 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=1JlcyvfVD+dndG3y1yWkLD0M7GKR4Bu6Kr5Wc0gikEo=; b=quKXd5asDNS2KxbF22U/jFdIH/PN6FJbxwef/V2p0XH+XZ4v1lMsuOsr0mS8JTCULG pG+NodOl0PkeyKvdv31EyVAUncJ0GmDpF4MRcSRbvFe2KSIX8wX8Uh9B7wwEL2WWdjQn prShdgUTPS0V8n067OzOlA+y+54ynbxPP5Ni0eahavbeDtLhrXFw1CWj/b8zVL44CWNZ RSaIfxRtPQCNt4IIs9TQOgf0TwARgAJTUo+3uWD1mgXppvcoxKNN9ploEKjlTyBS4QSy EPVYpxK1qm4EsdOzGNEfE3t/489Dp3a5erD5dOKW9G1dl6Fty8poUUjG/XIf9xzBwrzM arpg== |
| MIME-Version | 1.0 |
| X-Received | by 10.107.12.166 with SMTP id 38mr9908356iom.157.1439222934439; Mon, 10 Aug 2015 09:08:54 -0700 (PDT) |
| In-Reply-To | <55C8C7EB.6020401@mrabarnett.plus.com> |
| References | <D1ED09E0.10CC86%Dwight@GoldWinde.com> <CAPTjJmrPQ2PUnh46+C_=eKp8cy0nEtz4+P9k2qAeJYFxLopXcg@mail.gmail.com> <55C8C7EB.6020401@mrabarnett.plus.com> |
| Date | Tue, 11 Aug 2015 02:08:54 +1000 |
| Subject | Re: Importing is partially working... |
| 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.20+ |
| 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.45.1439222936.3627.python-list@python.org> (permalink) |
| Lines | 23 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1439222936 news.xs4all.nl 2917 [2001:888:2000:d::a6]:60920 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:95224 |
Show key headers only | View raw
On Tue, Aug 11, 2015 at 1:48 AM, MRAB <python@mrabarnett.plus.com> wrote: >> You're almost there! But in Python, you don't import something from a >> specific file - you import from a module, and the Python interpreter >> is free to locate that file anywhere that it can. It might be >> implemented in C, and be stored in Functions.so (on Unix-like systems) >> or Functions.dll (on Windows); it might be precompiled and loaded from >> Functions.pyc; it might come from a zip file, or some other form of >> special import source. So all you say is: >> > On Windows, the extension for Python extension DLLs is ".pyd". Or that. I haven't built any Python extensions in, well, ever, and haven't even deployed other people's in years, so I'm a bit rusty. Anyway, point is you don't have to care where it actually comes from. The one thing that I do kinda miss in Python is an easy way to "shadow and pull in the original" - to create something earlier in the search path, but then have that file get a reference to "the module that would have been loaded if I hadn't been here". It's not often you want it, but quite frankly, I don't know how I'd spell it at all. There probably is a way, but I've no idea what it is... ChrisA
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Importing is partially working... Chris Angelico <rosuav@gmail.com> - 2015-08-11 02:08 +1000
csiph-web