Please use code tags not color tags. I do not know what the program is supposed to do (for example you are calling class method at line 41 in ping, there is not reconfigure method) you must pass the object to function (it could event be method in App, I think):
# -*- coding: iso-8859-1 -*-
import Tkinter
import os
import threading
class Fil (threading.Thread):
def __init__ (self):
threading.Thread.__init__ (self)
print "Init Fil"
def f1 (self):
print 'f1'
#app().ecrit(1)
class App(Tkinter.Tk):
def __init__(self,parent):
Tkinter.Tk.__init__(self,parent)
print "Init App"
self.initialize()
ping(self)
def initialize(self):
self.grid()
self.bouton1L = Tkinter.Label(text="-", bg = "#00ffc0")
self.bouton1L.grid(column=0, row=1)
self.bouton2L = Tkinter.Label(text="-", bg = "#00ffc0")
self.bouton2L.grid(column=1, row=1)
self.x = Tkinter.Label(width=32)
self.x.grid(column=0, row=2)
def ecrit(self, num):
if num == 1:
self.bouton1L.configure(text="0")
elif num == 2:
self.bouton2L.configure(text="1")
def ping(app):
for x in xrange(2):
Fil().f1()
app.bouton1L.configure(text="A")
if __name__ == "__main__":
app = App(None)
app.ecrit(2)
app.mainloop()