tkinter file selector

Natacha nbodineau at club-internet.fr
Mon Jan 13 09:35:25 EST 2003


Hello,

We are using Python in environnement windows and we need help.

We want to use tkinter for an interface graphic so for this it s ok

The problem is in this programm :

you can execute it to see . When you click on 'Parcourir', i would
like to have the functions who give the files in the harddisk and
select one.

from Tkinter import*			
import Pmw
import sys
import os
import string
from Tkinter import _cnfmerge
import tkSimpleDialog

sys.path[:0] = ['../../..']

class Interface:
	def __init__(self):
		self.page = 0
		
		self.Page_Make()
		self.root.mainloop()
		
	def Page_Make(self):
		self.root=Tk()
		self.root.geometry('600x400')
		
		frame = Frame(self.root)
		
		self.root.title("PARALLELISATION DE TEXTES")
		self.txt1 = Label(self.root,text="Fichier
français",font=('arial',20))
		self.txt2= Label(self.root,text="Fichier anglais",font=('arial',20))
		
		self.entr1 = Entry(self.root,font=('arial',10))
		self.entr2 = Entry(self.root,font=('arial',10))
		
		self.button1=Button(self.root,text="Parcourir",relief=GROOVE,bd=7,padx=20,font=('Comic
Sans MS',10))
		self.button2=Button(self.root,text="Parcourir",relief=GROOVE,bd=7,padx=20,font=('Comic
Sans MS',10))
		self.button3=Button(self.root,text="Baliser",relief=GROOVE,bd=7,font=('Comic
Sans MS',15))
		
		#emplacement des widgets
		self.txt1.grid(row =0,sticky=W)
		self.txt2.grid(row =3,sticky=W)
		
		self.entr1.grid(row =1,pady=30,padx=30)
		self.entr2.grid(row =4,pady=30,padx=30)	

		self.button1.grid(row =1, column =5)
		self.button2.grid(row =4, column =5)		
		self.button3.grid(row =6)
		
		self.root.mainloop()
		
	
		
Interface()

Thanks for your response at this site or at
willy19 at voila.fr or
nbodineau at club-internet.fr




More information about the Python-list mailing list