Re: [Python-Dev] Relative imports in Py3k

2010-10-11 Thread Ron Adam
On 10/11/2010 07:27 AM, Nick Coghlan wrote: On Mon, Oct 11, 2010 at 1:54 AM, anatoly techtonik wrote: On Sun, Sep 26, 2010 at 2:32 PM, Nick Coghlan wrote: This is almost certainly failing because the directory containing the spyderlib package isn't on sys.path anywhere (instead, whichever d

Re: [Python-Dev] Relative imports in Py3k

2010-10-11 Thread Nick Coghlan
On Mon, Oct 11, 2010 at 1:54 AM, anatoly techtonik wrote: > On Sun, Sep 26, 2010 at 2:32 PM, Nick Coghlan wrote: >> This is almost certainly failing because the directory containing the >> spyderlib package isn't on sys.path anywhere (instead, whichever >> directory contains the script you execut

Re: [Python-Dev] Relative imports in Py3k

2010-10-10 Thread R. David Murray
> On Sun, 10 Oct 2010 18:54:20 +0300, anatoly techtonik > wrote: > > (The explanation of the failures applies for all Python versions that > > I am aware of, but the -m based fix only became available in 2.6) > > (The impact of various command line options and the PYTHONPATH > > environment varia

Re: [Python-Dev] Relative imports in Py3k

2010-10-10 Thread anatoly techtonik
On Sun, Sep 26, 2010 at 2:32 PM, Nick Coghlan wrote: >> >> I wonder if situation with relative imports in packages is improved in >> Python 3k or >> we are still doomed to a chain of hacks? This is The question. Is Python 3k more friendly to users or require them to learn the "zen of import" (whi

Re: [Python-Dev] Relative imports in Py3k

2010-10-10 Thread anatoly techtonik
On Sat, Sep 25, 2010 at 4:52 PM, Georg Brandl wrote: >> >> I wonder if situation with relative imports in packages is improved in >> Python 3k or we are still doomed to a chain of hacks? >> >> My user story: ... >> PEP 328 http://www.python.org/dev/peps/pep-0328/  proposes: >> >> from ... import c

Re: [Python-Dev] Relative imports in Py3k

2010-09-26 Thread Nick Coghlan
On Sat, Sep 25, 2010 at 11:15 PM, anatoly techtonik wrote: > Hi, > > I wonder if situation with relative imports in packages is improved in > Python 3k or > we are still doomed to a chain of hacks? > > My user story: > I am currently debugging project, which consists of many modules in one > pack

Re: [Python-Dev] Relative imports in Py3k

2010-09-26 Thread Nick Coghlan
On Sun, Sep 26, 2010 at 7:46 AM, "Martin v. Löwis" wrote: > What you read as a bug report was labeled "user story", > which I think is anatoly's way of saying "it's not a bug > report". Skimming the original post, I actually thought of two possible candidates that fit the "it doesn't work" monike

Re: [Python-Dev] Relative imports in Py3k

2010-09-25 Thread Martin v. Löwis
> Also, it's a horrible bug report, if that's what it is. It's not a bug report, and I don't think it was meant to be one. It started with "I wonder if", suggesting that it is really a request for help. What you read as a bug report was labeled "user story", which I think is anatoly's way of sayi

Re: [Python-Dev] Relative imports in Py3k

2010-09-25 Thread Eric Smith
On 9/25/2010 9:15 AM, anatoly techtonik wrote: from ... import config from ..utils.qthelpers import translate, add_actions, create_action But this doesn't work, and I couldn't find any short user level explanation why it is not possible to make this work at least in Py3k without additional magic

Re: [Python-Dev] Relative imports in Py3k

2010-09-25 Thread Georg Brandl
Am 25.09.2010 15:15, schrieb anatoly techtonik: > Hi, > > I wonder if situation with relative imports in packages is improved in > Python 3k or we are still doomed to a chain of hacks? > > My user story: > I am currently debugging project, which consists of many modules in one > package. > Each m

[Python-Dev] Relative imports in Py3k

2010-09-25 Thread anatoly techtonik
Hi, I wonder if situation with relative imports in packages is improved in Python 3k or we are still doomed to a chain of hacks? My user story: I am currently debugging project, which consists of many modules in one package. Each module has tests or other useful stuff for debug in its main sectio