0

my code has this structure

class Mapsframe(wx.Frame):

    def __init__(self):
        import application


class Example(wx.Frame,listmix.ColumnSorterMixin):
    def __init__(self, *args, **kwargs):
        super(Example, self).__init__(*args, **kwargs) 
        self.InitUI()

    def InitUI(self):

    def onItemSelected(self,event):


            frame = Mapsframe()

and i need to pass two variables which have been created localy inside the def onItemSelected to another python script called application.py any ideas?

2
Contributors
1
Reply
30
Views
3 Years
Discussion Span
Last Post by pyTony
0

Import should be mostly at beginning, so

import application    

class Mapsframe(wx.Frame):
    def __init__(self):
        pass

class Example(wx.Frame,listmix.ColumnSorterMixin):
    def __init__(self, *args, **kwargs):
        super(Example, self).__init__(*args, **kwargs) 
        self.InitUI()

    def InitUI(self):
        pass

    def onItemSelected(self,event):
            frame = Mapsframe()
            application.one_function(frame) #e.g.

Edited by pyTony

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.