Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #81950
| From | Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de> |
|---|---|
| Subject | Re: Style question: Importing modules from packages - 'from' vs 'as' |
| Date | 2014-12-04 21:56 +0100 |
| References | <CAPTjJmo1-QCgcbsjKNgH3oN-nm5qjB5GrvCiC6Qc9p+S8cNjpg@mail.gmail.com> <2047880662.4611734.1417714597653.JavaMail.root@sequans.com> <CAPTjJmpgM2n=AdY+8gZ40gqe1S2zfD83Ui-f5SngRYLA3jMtCQ@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.16587.1417726622.18130.python-list@python.org> (permalink) |
On 04.12.2014 19:05, Chris Angelico wrote: > > With os.path it definitely is. With the actual code in question, it's > a Python 2.7 project that mostly uses relative imports - inside > package.module1 is "import module2" etc - and I was writing an > external script that calls on one of the modules. What ? I'm usually thinking Python 3 not 2 and I'm never sure which Python 2.x has backported which feature of 3, but I thought implicit relative imports like you seem to describe are not working in 2.7 ? Wolfgang
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Style question: Importing modules from packages - 'from' vs 'as' Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de> - 2014-12-04 21:56 +0100
csiph-web