H
Hidekazu IWAKI
Hi, I'm hidekazu.
I'm making a Tk application with python.
In the below code, the class App was inherited from Tkinter.Tk and the
__init__ method calls Tk's constructor with `super` method. In windows,
this code is valid (but, Tkinter -> tkinter).
Why does this code happen a type error in not windows platform?
thank you.
#--------------------------------------------------------
from Tkinter import *
class App(Tk):
def __init__(self):
super(Tk,self).__init__()
App().mainloop()
#Traceback (most recent call last):
# File "./app.py", line 16, in <module>
# App().mainloop()
# File "./app.py", line 7, in __init__
# super(Tk,self).__init__()
#TypeError: super() argument 1 must be type, not classobj
/////////////////////////////////////////////////
$B4d>k!!=(OB!J$$$o$-!!$R$G$+$:!K(B
e-mail: (e-mail address removed)
/////////////////////////////////////////////////
I'm making a Tk application with python.
In the below code, the class App was inherited from Tkinter.Tk and the
__init__ method calls Tk's constructor with `super` method. In windows,
this code is valid (but, Tkinter -> tkinter).
Why does this code happen a type error in not windows platform?
thank you.
#--------------------------------------------------------
from Tkinter import *
class App(Tk):
def __init__(self):
super(Tk,self).__init__()
App().mainloop()
#Traceback (most recent call last):
# File "./app.py", line 16, in <module>
# App().mainloop()
# File "./app.py", line 7, in __init__
# super(Tk,self).__init__()
#TypeError: super() argument 1 must be type, not classobj
/////////////////////////////////////////////////
$B4d>k!!=(OB!J$$$o$-!!$R$G$+$:!K(B
e-mail: (e-mail address removed)
/////////////////////////////////////////////////