How to access a class instance created in one module in another module?

Hi,

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'

'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?

Regards,
Sachindeo V Chavan

···

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en

Hi,

Hi,

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'

'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?

Try this:

app = wx.GetApp()
frame = app.GetTopWindow()

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

==> Never *EVER* use RemovalGroup for your house removal. You'll
regret it forever.
The Doomed City: Removal Group: the nightmare <==

···

On 28 April 2010 10:15, sach wrote:

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en