[wxPython-users] RE: Open and Save Dialogs

Richard Querin rfquerin at gmail.com
Thu Aug 2 11:35:54 PDT 2007


On 8/2/07, Mike Driscoll <mdriscoll at co.marshall.ia.us> wrote:
>
>
> > -----Original Message-----
> > From: Ian Mallett [mailto:geometrian at gmail.com]
> > Sent: Wednesday, August 01, 2007 10:48 PM
> > To: wxpython-users at lists.wxwidgets.org
> > Subject: Open and Save Dialogs
> >
> > Hi,
> >
> > I've been looking around for a file opener and a file closer
> > dialog.  wxPython appears perfect for the job.  The demo
> > FileDialog.py includes both.  However, the save/open dialogs
> > launch from another screen.  What I'd like is for when in my
> > code I do something like:
> >
> > import save, open
> > def main():
> >   filename = save.main()
> >   #later...
> >   filename = open.main()
> >
> > two modules, save and open, will run their corresponding dialogs.
> >
> > This is my first wxPython project, but I took an attempt at
> > making open and save functions (attachments).  They run, but
> > they still launch from the same table.  Can anyone help?
> > Thank you very much.
> >
> > Ian
> >
>
> I must be missing something here. Can't you just use one panel with 2
> buttons? One button opens a file and the other button save? Or better yet,
> create a menubar with Open and Save options and have them launch the
> wx.FileDialog methods with the appropriate flags?
>
> Mike
>

I'm not sure of the intent of the original poster. Is it a case of
wanting to keep the code separate? ie. a separate module containing
all the dialog box related code?

I know that when I've used a standard open or save dialog box, it only
amounts to a 10 or 15 line event handler function. I've never seen the
need to try and keep things separate.

RQ




More information about the wxpython-users mailing list