Maybe this leads to nothing and is more-or-less a theoretical question, but anyway, I'll give you another example:
a1.py -------- x = "A1" import b a2.py -------- x = "A2" import b b.py --------- # the module which imports me is a blackbox to me def get_the_x_of_the_module_which_is_importing_me(): return #??? Regards, Aidas Bendoraitis [aka Archatas] P.S. If I am not understandable because of "strange" English, it might be that I need some coffee or sleep. :) On 3/30/07, Rubic <[EMAIL PROTECTED]> wrote: > > b.py: > ------------ > import a > ... > def test(): > print a.x > > -- > Jeff Bauer > Rubicon, Inc. > > > On Mar 30, 6:43 am, "Aidas Bendoraitis" <[EMAIL PROTECTED]> > wrote: > > Let's say I have the files main.py, a.py and b.py > > > > main.py: > > ----------- > > x="some local value" > > import a > > ... > > > > a.py: > > ----------- > > x="some other local value" > > import b > > ... > > > > b.py: > > ----------- > > def test(): > > print x > > > > ---------------------- > > Is it possible to access the x of the module a.py in the module b.py? > > What would be the functions/statements to make it possible? Or in > > general, how to access the locals of the importing ( not imported!!!) > > module? > > > > Regards, > > Aidas Bendoraitis > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---