On Jan 21, 3:46 pm, Robert Bradshaw <rober...@math.washington.edu>
wrote:
> On Fri, Jan 21, 2011 at 12:28 PM, LouP <pec...@anvil.nrl.navy.mil> wrote:
>
> > I have more information.  I ran my script using the pre-installed
> > python 2.6 framework on my Mac and the Mac version of the dialogs was
> > used (which is what I want),
>
> Just out of curiosity, what script are you running and how is it
> opening dialog boxes? Is it just a standard Python script?

Hi, Robert,

Here's the whole thing:

#!/usr/bin/env sage -python

                def open_files(starting_dir):
                        """Returns list of filenames+paths given starting dir"""
                        import Tkinter
                        import tkFileDialog

                        root = Tkinter.Tk()
                        root.withdraw() # Hide root window
                        filenames =
tkFileDialog.askopenfilenames(parent=root,initialdir=starting_dir)
                        return list(filenames)

                stdir= '/Users/louispecora/Desktop/'
                fl= open_files(stdir)
                print fl

I'm just testing getting a file name from the dialog.  Running the
above in sage brings up the X11 dialog. Running it with the Mac python
(changing the she-bang command) gives me the Mac dialog.  I think
you're right that something is set somewhere in the sage directory,
but I have no idea what or where.  If I plot with matplotlib using
TKAgg I get the X11 plot window as you might guess.  I wouldn't mind
recompiling sage if I could get the Mac dialogs and windows.  Who
would know the answer to this?

Thanks.

-- Lou Pecora

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to