"Rafael Durán Castañeda" wrote...
Thank you for your answer Frank, I think I've found the problem. I was
calling modules from inside subpackages, and I need to use them from
outside, so I have package in PYTHONPATH. is that correct? But now I have
another question: Can I execute an script insi
Thank you for your answer Frank, I think I've found the problem. I was
calling modules from inside subpackages, and I need to use them from
outside, so I have package in PYTHONPATH. is that correct? But now I have
another question: Can I execute an script inside subpackage1 importig
modules from su
On February 28 2011 Rafael Durán Castañeda wrote
I'm stil totally stuck with relative imports, i' ve tried the example tree
from PEP 328 without any result:
package/
__init__.py
subpackage1/
__init__.py
moduleX.py
moduleY.py
subpackage2/
__init__.py
I'm stil totally stuck with relative imports, i' ve tried the example tree
from PEP 328 without any result:
package/
__init__.py
subpackage1/
__init__.py
moduleX.py
moduleY.py
subpackage2/
__init__.py
moduleZ.py
moduleA.py
Assuming that the
"Steven D'Aprano" wrote in message
news:4d6a56aa$0$29972$c3e8da3$54964...@news.astraweb.com...
On Sun, 27 Feb 2011 12:08:12 +0200, Frank Millman wrote:
Assume the following structure -
main.py
/pkg
__init__.py
mod1.py
mod2.py
main.py
from pkg import mod1
mod1.py
import
On Sun, 27 Feb 2011 12:08:12 +0200, Frank Millman wrote:
> Assume the following structure -
>
> main.py
> /pkg
> __init__.py
> mod1.py
> mod2.py
>
> main.py
> from pkg import mod1
>
> mod1.py
> import mod2
>
> mod2.py
> import mod1
If you change the "import mod*" lines
"Ben Finney" wrote in message
news:87aahh6401@benfinney.id.au...
"Frank Millman" writes:
Assume the following structure -
main.py
/pkg
__init__.py
mod1.py
mod2.py
main.py
from pkg import mod1
mod1.py
import mod2
mod2.py
import mod1
What are you expecting the result
"Frank Millman" writes:
> Assume the following structure -
>
> main.py
> /pkg
>__init__.py
>mod1.py
>mod2.py
>
> main.py
>from pkg import mod1
>
> mod1.py
>import mod2
>
> mod2.py
> import mod1
What are you expecting the result to be?
If it's about sharing objects between t
Hi all
I thought I was getting the hang of circular imports, but after upgrading to
python 3.2 I am stumped again. I know some people think that circular
imports are always bad, but others suggest that, provided you understand the
potential problems, they can be acceptable.
Assume the follow