Greg Ewing wrote:
> Magnus Lycka wrote:
>
>> Due to the cycle, you can never use file1 without
>> file2 or vice versa. Why do you then want it to be
>> two different modules instead of one?
>
> Perhaps because it would then be too big and
> unwieldy to maintain?
>
> Sometimes there are legitimat
Magnus Lycka wrote:
> Due to the cycle, you can never use file1 without
> file2 or vice versa. Why do you then want it to be
> two different modules instead of one?
Perhaps because it would then be too big and
unwieldy to maintain?
Sometimes there are legitimate reasons for
mutually-dependent mod
On Friday 10 June 2005 07:27 am, Magnus Lycka wrote:
> [EMAIL PROTECTED] wrote:
> > I have two modules (file1.py and file2.py)
> > Is that ok in python (without any weird implication) if my module
> > import each other. I mean in module file1.py there exist command import
> > file2 and in module fi
[EMAIL PROTECTED] wrote:
> Hello,
>
> I have two modules (file1.py and file2.py)
> Is that ok in python (without any weird implication) if my module
> import each other. I mean in module file1.py there exist command import
> file2 and in module file2.py there exist command import file1?
Even if i
Thomas Guettler wrote:
> file1.py:
> import file2
>
>
> file2.py:
> # import file1 # Does not work!
Actually, that *will* work as long as you don't
try to use anything from file1 until it has finished
being loaded.
What won't work is
file2.py:
from file1 import somename
because som
That's the only way out I found with some module import problem using code
generated by wxDesigner.
Josef Meile wrote:
>>>Circular import does not work on module level, but you can
>>>import the module in a method:
>>>
>>>file1.py:
>>>import file2
>>>
>>>
>>>
>>>file2.py:
>>># import file1 #
>>Circular import does not work on module level, but you can
>>import the module in a method:
>>
>>file1.py:
>>import file2
>>
>>
>>
>>file2.py:
>># import file1 # Does not work!
>>def foo():
>>import file1 # Does work
>
>
> Cool idea !
>
> It works on local namespaces, wich dont cause t
Hi !
> Circular import does not work on module level, but you can
> import the module in a method:
>
> file1.py:
> import file2
>
>
>
> file2.py:
> # import file1 # Does not work!
> def foo():
> import file1 # Does work
Cool idea !
It works on local namespaces, wich dont cause trouble t
Am Wed, 08 Jun 2005 01:11:50 -0700 schrieb [EMAIL PROTECTED]:
> Hello,
>
> I have two modules (file1.py and file2.py)
> Is that ok in python (without any weird implication) if my module
> import each other. I mean in module file1.py there exist command import
> file2 and in module file2.py there
Hello,
I have two modules (file1.py and file2.py)
Is that ok in python (without any weird implication) if my module
import each other. I mean in module file1.py there exist command import
file2 and in module file2.py there exist command import file1?
This is not working in C#.
pujo
--
http://m
10 matches
Mail list logo