On Wed, Apr 28, 2010 at 3:02 PM, Goodies <sachin_cha...@yahoo.com> wrote: > I have a query. I have two modules viz. MnSem5Main.py and MnCEMMain.py in > different folders. > I have created the below instances in MnSem5Main.py: > > 'app' , 'frame' > Please note that 'app' is created using wx.App and 'frame' using wx.Frame > builtin classes. > I want to access these in MnCEMMain.py. How to access these instances?
Your terminology is a little muddled here. It sounds like what you mean is that you created classes called app and frame in MnSem5Main.py which subclass (or inherit from) wx.App and wx.Frame. if MnSem5Main.py is on your PYTHONPATH, you can import the classes by putting the following line in MnSem5Main.py: from MnSem5Main import app, frame Then you can create instances of the classes by calling them with the appropriate parameters. Even if app and frame are instances of classes instead of classes, the import statement will get them from the MnSem5Main namespace and put them in your namespace. xtian _______________________________________________ python-uk mailing list python-uk@python.org http://mail.python.org/mailman/listinfo/python-uk