Re: [Tutor] Module for browsing Windows?

2010-08-11 Thread Tim Golden

On 11/08/2010 01:17, Chorn, Guillaume wrote:

Hello,

I'm pretty new to Python programming and it is my first programming
language.  I made a script that uses data from two different .csv files
to make calculations and then spit the results out in a third .csv file.
However, the process of typing in the path to each of the two input
files and the output file (or even copying and pasting those paths) is
somewhat cumbersome from a UI perspective, and so I was wondering if
there is a Python module out there that allows you to browse to and
select files using a Windows-style interface.  Thanks!


Take you pick of any of these:

  http://wiki.python.org/moin/GuiProgramming

Although (to select one) you might find that EasyGui
gets you going the quickest:

  http://easygui.sourceforge.net/

TJG
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Module for browsing Windows?

2010-08-11 Thread Wayne Werner
On Tue, Aug 10, 2010 at 7:17 PM, Chorn, Guillaume guillaume_ch...@merck.com
 wrote:

  Hello,

 I'm pretty new to Python programming and it is my first programming
 language.  I made a script that uses data from two different .csv files to
 make calculations and then spit the results out in a third .csv file.
 However, the process of typing in the path to each of the two input files
 and the output file (or even copying and pasting those paths) is somewhat
 cumbersome from a UI perspective, and so I was wondering if there is a
 Python module out there that allows you to browse to and select files using
 a Windows-style interface.  Thanks!

Tkinter is pretty easy:

import Tkinter as tk
import tkFileDialog as fd

root = tk.Tk()
root.widthdraw()

csv1 =  fd.askopenfilename()
csv2 = fd.askopenfilename()

# Do the rest of your stuff here.

HTH!
-Wayne
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Module for browsing Windows?

2010-08-11 Thread Alan Gauld


Chorn, Guillaume guillaume_ch...@merck.com wrote


there is a Python module out there that allows you to browse to and
select files using a Windows-style interface.  Thanks!



EasyGUI is designed for exactly that kind of mixed mode programming.

You can find a basic intro in the Talking to the User topic 
of my tutorial.


HTH,


--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor