OUvrir une dialogbox pour fichier
Bonsoir,
je débute en python.
La FAQ propose
Code:
1 2 3 4
| import tkinter.filedialog 'Ajouté
'import tkinter ne fonctionne pas non pus
tkFileDialog.askopenfilename(filetypes = [("All", "*"),("Fichiers Python","*.py;*.pyw")])) |
J'obtiens :
Citation:
Traceback (most recent call last):
File "C:\Users\oly\Desktop\Longueur.py", line 3, in <module>
tkFileDialog.askopenfilename(filetypes = [("All", "*"),("Fichiers Python","*.py;*.pyw")])
NameError: name 'tkFileDialog' is not defined
Où vais-je trouver cette fonction ?
Merci.
Merci à vous VinsS et Clodion
j'étais très très très loin.
Par contre, j'obtiens un fenêtre Tk impossible à fermer.
VinsS, L'exemple de code ne fonctionne pas
Citation:
import Tkinter, Tkconstants, tkFileDialog
J'ai pourtant remplacé "TkFileDialog" en "FileDialog" et j'ai rien trouvé pour "Tkconstants".
ESVBA