I am working on scripts using numpy, scipy and matplotlib to analyze some image data. I would like to be able to select the particular image I want to analyze, so I need a file selection dialog or similar. I know this can be done with any gui toolkit, but I was wondering if there isn't an easier way, less involved that getting into gui programming. Would it be hard to mimic the file open button in the toolbar to do what I want?
From: Alan G Isaac <alan.isaac@gm...> - 2009-06-04 12:01:03
On 6/4/2009 3:59 AM jorgesmbox-ml@... apparently wrote:
> I need a file selection dialog or similar
Tkinter makes this pretty easy. E.g.,
>>> import tkFileDialog as fd
>>> fname = fd.askopenfilename(initialdir='c:/temp')
That's all, as long as you don't mind destroying
the Window manually. (Otherwise, you need just
a couple more lines.)
Alan G Isaac <alan.isaac@...> writes:
> That's all, as long as you don't mind destroying
> the Window manually. (Otherwise, you need just
> a couple more lines.)
Thanks, I'll give this a try.