Path: csiph.com!usenet.pasdenom.info!news.franciliens.net!news.muarf.org!news.ecp.fr!feeder1.cambriumusenet.nl!82.197.223.108.MISMATCH!feeder2.cambriumusenet.nl!feed.tweaknews.nl!194.134.4.91.MISMATCH!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'syntax': 0.04; 'subject:module': 0.09; '\xe2\x80\x94': 0.09; 'cc:addr:python- list': 0.11; 'python': 0.11; '"from': 0.16; '(ubuntu': 0.16; '2.7.3': 0.16; '__future__': 0.16; 'imports': 0.16; 'syntaxerror:': 0.16; 'url:whatsnew': 0.16; 'wrote:': 0.18; 'import': 0.22; 'cc:addr:python.org': 0.22; 'mon,': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'header:In-Reply- To:1': 0.27; "doesn't": 0.30; 'absolute': 0.30; 'relative': 0.30; 'message-id:@mail.gmail.com': 0.30; 'url:mailman': 0.30; '"",': 0.31; '>>>>': 0.31; 'work:': 0.31; 'file': 0.32; 'url:python': 0.33; 'form.': 0.35; 'received:google.com': 0.35; 'url:listinfo': 0.36; 'url:org': 0.36; 'skip:4 10': 0.37; 'pm,': 0.38; 'url:mail': 0.40; 'url:5': 0.61; 'more': 0.64; 'invalid': 0.68; 'jul': 0.74; '2013': 0.98 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:to :cc:content-type:content-transfer-encoding; bh=vexpI2N3yvU3RtlDVTA8kbkNG24myGXp/XY3uOhq7YI=; b=RRGqiDF7LIBBvmpd1gs4wc6/4tFaUwqiWoujk8pN7FoVeMRF5lWlLxwT2HAUv8lkaV TFePrFMzKyzegq52lxSIJW02a59QdU1bsyd2X4OmFwIbpjqJJbOdW7aDhTNsP4FESC2T NohE9YTKgR+80nYPOK0h6Nl5lMXu0nEPpQgs74uE4hh7nAjwv78Pwc9e/ojy45Bvjy8P clisWx2B/RhK/51XGouMz3tv//wcYFGTmXvTzD7ujJUJubv0bQQeKRG5Jfg7Mu4dvxNc AGBC9RnEiDyln64ytXuWyxNr2I3TFsgzfYUf235foF0UAGF0SO3qNkDmGj36u7uEGhWv p5gw== MIME-Version: 1.0 X-Received: by 10.52.23.49 with SMTP id j17mr8697513vdf.56.1372711203305; Mon, 01 Jul 2013 13:40:03 -0700 (PDT) In-Reply-To: References: Date: Mon, 1 Jul 2013 16:40:03 -0400 Subject: Re: PYTHONPATH and module names From: "SpaghettiToastBook ." To: Tobiah Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Tue, 02 Jul 2013 09:20:26 +0200 Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 25 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1372749627 news.xs4all.nl 15881 [2001:888:2000:d::a6]:54386 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:49619 Relative imports only work with the "from ... import ..." form. =E2=80=94 SpaghettiToastBook On Mon, Jul 1, 2013 at 3:54 PM, Tobiah wrote: >> Are you familiar with absolute and relative imports: >> http://docs.python.org/release/2.5/whatsnew/pep-328.html > > > Doesn't seem to work: > > Python 2.7.3 (default, May 10 2012, 13:31:18) > [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu4)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. >>>> from __future__ import absolute_import >>>> import .format > File "", line 1 > import .format > ^ > SyntaxError: invalid syntax >>>> > > -- > http://mail.python.org/mailman/listinfo/python-list