On Tue, Sep 2, 2008 at 6:22 PM, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > >>> # myglobals.py: >>> answer = 42 >>> >>> # question.py >>> import myglobals >>> myglobals.answer = "WTF ?" >>> >> >> But if I do :- >> #question.py >> from myglobals import * >> myglobals.answer = "WTF ?" >> >> will this work? > > with the above definition of myglobals, no. "from myglobals import" doesn't > add the module object to the importing module's namespace. > > have you read: > > http://effbot.org/zone/import-confusion.htm > > ? > > </F> > > -- > http://mail.python.org/mailman/listinfo/python-list >
Thanks for your help guys that I got my problem resolved. Regards, Rajat -- http://mail.python.org/mailman/listinfo/python-list