Unknown Tkinter bug

Krzysztof Szynter dygimailNo at SPAMpoczta.fm
Thu May 20 08:12:09 EDT 2004


Hi all

Like i said, i'am back. With another problem of course. 
This is my code:

---BEGIN
win=Tkinter.Tk()
can=Tkinter.Canvas(win,width=500,height=500,background='blue')
can.pack() 

# creating main lines
can.create_rectangle(10,10,490,490)
can.create_line(25,225,485,225)
can.create_line(250,470,250,20)
can.create_polygon((245,20),(250,10),(255,20)) 
can.create_polygon((475,230),(485,225),(475,220))
can.create_text(460,250,text='dV [m3]') 
can.create_text(280,25,text='dU [J]') 

# creating sublines
while x<450 or y<450 : 
    can.create_line((30+x,220),(30+x,225),(30+x,230))
    can.create_line((245,25+y),(250,25+y),(255,25+y))
    x=x+10
    y=y+10

# starting drawing function image
for i in range(0,len(deV)):
    can.create_oval(250+deV[i],250-deU[i],250+deV[i]+1,
    250-deU[i]+1,width=3,outline='white')
for i in range(0,len(deV)-1):
    can.create_line(250+deV[i],250-deU[i],250+deV[i+1],
    250-deU[i+1],width=1,fill='yellow')

# creating etiquettes
can.create_text(250+200,210,text=int(maxdeV),fill='white')
can.create_text(250+10,250-200,text=int(maxdeU),fill='white',anchor='w')    
can.create_text(250-200,240,text=int(mindeV),fill='white')
can.create_text(250-30,250+200,text=int(mindeU),fill='white',anchor='s')    

win.mainloop()
---END

After i close graphcial window, shell gives this error message:

---BEGIN
Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Program Files\Python232\lib\lib-tk\Tkinter.py", 
  line 1345, in __call__ 
return self.func(*args)
  File "C:\Program Files\Python232\lib\idlelib\ScriptBinding.py", 
  line 157, in run_module_event
interp.runcode(code)
  File "C:\Program Files\Python232\lib\idlelib\PyShell.py", 
  line 658, in runcode
self.interp.restart_subprocess()
AttributeError: ModifiedInterpreter instance has no attribute 'interp'
---END

Where should i look for a mistake?

-- 
Krzysztof Szynter         :'''.       :.   :                  *
Dygi GG 1027078           :...' ..... : :  : ..... . . . .    . .....
http://newbie.friko.pl    :   : :.... :  : : :.... :: :: :..  : :....
dygimail(at)poczta(dot)fm :...' :.... :   ': :.... :   : :..' : :....



More information about the Python-list mailing list