471,318 Members | 1,865 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,318 software developers and data experts.

Transfer file name input from one .py to another

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

Jun 20 '07 #1
1 1124
ma************@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
Jun 20 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

12 posts views Thread by Pete..... | last post: by
8 posts views Thread by bryan | last post: by
6 posts views Thread by Thom Little | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.