[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Is it possible to reload a module from a different file?

IloChab

3/12/2008 12:01:00 PM

I mean ...

The main module makes this import:


import moduleX


later other modules make different import to an other module named
moduleX like this:


from pack.subdir import moduleX


What I want is that the second import of moduleX in some way must be
redirected onto the first one.

Is there any way to do so?

Would there be any way to do so (moduleX overrides pack.subdir.moduleX)
if they were imported on reverse order?


Any time I discover that Python can do amazing things, but perhaps this
one is just a silly one, isn't it?

ciao
Licia
2 Answers

Forehead

10/19/2011 8:19:00 PM

0

On 10/19/2011 2:35 PM, who? wrote:
> On Oct 19, 2:28 pm, Forehead<foreh...@invalid.invalid> wrote:
>> On 10/16/2011 12:34 AM, who? wrote:
>>
>>
>>
>>> The song has those high Beatlesque harmonies, not to be confused with
>>> The Lovin' Spoonful song.
>>
>> I think it's by Electric Light Orchestra, circa mid '70s. ELO were/are
>> Beatles disciples.
>> fhead
>
> I've already told 2 posters the version I was looking for in
> this thread. ELO might have done a version of it.

Yes, and it turns out that I was thinking of "Strange Magic" by ELO.
f

Jeff

10/20/2011 3:32:00 AM

0

On Oct 19, 3:19 pm, Forehead <foreh...@invalid.invalid> wrote:
> On 10/19/2011 2:35 PM, who? wrote:
>
> > On Oct 19, 2:28 pm, Forehead<foreh...@invalid.invalid>  wrote:
> >> On 10/16/2011 12:34 AM, who? wrote:
>
> >>>    The song has those high Beatlesque harmonies, not to be confused with
> >>> The Lovin' Spoonful song.
>
> >> I think it's by Electric Light Orchestra, circa mid '70s. ELO were/are
> >> Beatles disciples.
> >> fhead
>
> > I've already told 2 posters the version I was looking for in
> > this thread. ELO might have done a version of it.
>
> Yes, and it turns out that I was thinking of "Strange Magic" by ELO.
> f

I like that song. They had some good music.