Problèmes interfichier
Strong214356
Messages postés
2
Date d'inscription
Statut
Membre
Dernière intervention
-
bobonou Messages postés 79 Date d'inscription Statut Membre Dernière intervention -
bobonou Messages postés 79 Date d'inscription Statut Membre Dernière intervention -
bonjour j'ai un problème avec mes inclusions.
pouvez vous maider? (je suis sous linux)
main.py:
functions.py :
merci
pouvez vous maider? (je suis sous linux)
main.py:
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from Tkinter import * from functions import * f = Tk() f.title("Lancé de dé") mbar = Menu(f) f.config(menu=mbar) mlance = Menu(mbar, tearoff=0) mbar.add_cascade(label="menu", menu=mlance) mlance.add_command(label="lancer", command=afficher()) mlance.add_separator() mlance.add_command(label="quitter", command=f.destroy) nbmdd = Spinbox(f, from_=2, to=100) nbmdd.pack(side=TOP) l1 = Label(f, text="nombre maximal du dé ^") l1.pack(side=TOP) nbdd = Spinbox(f, from_=1, to=20) nbdd.pack(side=TOP) l2 = Label(f, text="nombre de dé ^") l2.pack(side=TOP) f.mainloop()
functions.py :
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from random import * from Tkinter import * result = 0 def afficher(): print ("test")
merci
il faut peut-être mettre func.afficher sans les parenthèses à la fin.