Transfer file name input from one .py to another

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mark.martinez2@gmail.com

    #1

    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

  • Larry Bates

    #2
    Re: Transfer file name input from one .py to another

    mark.martinez2@ 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=par ent

    #
    # Now you can refer to the filename by accessing
    #
    self.parent.fil enamefromdialog

    class main:
    def getfilefromdial og(self):
    self.filenamefr omdialog=...

    -Larry

    Comment

    Working...