Re: [Python-Dev] Another relative imports question

2010-10-09 Thread Martin v. Löwis
Am 09.10.2010 01:35, schrieb Greg Ewing: Georg Brandl wrote: The explanation is that everything that comes after import is thereafter usable as an identifier (or expression, in the case of dotted names) in code. .mymodule is not a valid expression, so the question would be how to refer to

Re: [Python-Dev] Another relative imports question

2010-10-09 Thread Ron Adam
On 10/09/2010 12:39 PM, Martin v. Löwis wrote: Am 09.10.2010 01:35, schrieb Greg Ewing: Georg Brandl wrote: The explanation is that everything that comes after import is thereafter usable as an identifier (or expression, in the case of dotted names) in code. .mymodule is not a valid

Re: [Python-Dev] Another relative imports question

2010-10-08 Thread Georg Brandl
Am 08.10.2010 10:50, schrieb Chris Withers: Hi All, The new explicit relative import syntax is great. I wanted to relatively import a module. import .mymoduleinmypackage and got a SyntaxError in Python 2.6. I guess I need to do: from . import mymoduleinmypackage but it

Re: [Python-Dev] Another relative imports question

2010-10-08 Thread Greg Ewing
Georg Brandl wrote: The explanation is that everything that comes after import is thereafter usable as an identifier (or expression, in the case of dotted names) in code. .mymodule is not a valid expression, so the question would be how to refer to it. I think a reasonable answer is that you