Transfer file name input from one .py to another
Larry Bates
larry.bates at websafe.com
Wed Jun 20 10:57:08 EDT 2007
mark.martinez2 at gmail.com wrote:
> How do I transfer the file name which is input in one .py (an MDI
> parent frame in wxPython) to another .py (an MDI child frame)? The
> parent gets the file name from the user via a file select dialog, but
> the child frame is the one that needs to know what file it is working
> with.
>
> Thanks
>
Normally I do something like:
class childFrame:
def __init__(self, parent, *args):
self.parent=parent
#
# Now you can refer to the filename by accessing
#
self.parent.filenamefromdialog
class main:
def getfilefromdialog(self):
self.filenamefromdialog=...
-Larry
More information about the Python-list
mailing list