summaryrefslogtreecommitdiffstats
path: root/lib/kross/test/testgui.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kross/test/testgui.py')
-rw-r--r--lib/kross/test/testgui.py42
1 files changed, 21 insertions, 21 deletions
diff --git a/lib/kross/test/testgui.py b/lib/kross/test/testgui.py
index b5efb8dc..0a3cf822 100644
--- a/lib/kross/test/testgui.py
+++ b/lib/kross/test/testgui.py
@@ -8,32 +8,32 @@
class TkTest:
def __init__(self):
- import Tkinter
- self.root = Tkinter.Tk()
+ import tkinter
+ self.root = tkinter.Tk()
self.root.title("TkTest")
self.root.deiconify()
- self.mainframe = Tkinter.Frame(self.root)
+ self.mainframe = tkinter.Frame(self.root)
self.mainframe.pack()
- self.button1 = Tkinter.Button(self.mainframe, text="Button1", command=self.callback1)
- self.button1.pack(side=Tkinter.LEFT)
+ self.button1 = tkinter.Button(self.mainframe, text="Button1", command=self.callback1)
+ self.button1.pack(side=tkinter.LEFT)
- self.button2 = Tkinter.Button(self.mainframe, text="Button2", command=self.callback2)
- self.button2.pack(side=Tkinter.LEFT)
+ self.button2 = tkinter.Button(self.mainframe, text="Button2", command=self.callback2)
+ self.button2.pack(side=tkinter.LEFT)
- self.exitbutton = Tkinter.Button(self.mainframe, text="Exit", command=self.root.destroy)
- self.exitbutton.pack(side=Tkinter.LEFT)
+ self.exitbutton = tkinter.Button(self.mainframe, text="Exit", command=self.root.destroy)
+ self.exitbutton.pack(side=tkinter.LEFT)
self.root.mainloop()
def callback1(self):
- import tkMessageBox
- tkMessageBox.showinfo("Callback1", "Callback1 called.")
+ import tkinter.messagebox
+ tkinter.messagebox.showinfo("Callback1", "Callback1 called.")
def callback2(self):
- import tkMessageBox
- tkMessageBox.showinfo("Callback2", "Callback2 called.")
+ import tkinter.messagebox
+ tkinter.messagebox.showinfo("Callback2", "Callback2 called.")
class TQtTest:
def __init__(self):
@@ -41,7 +41,7 @@ class TQtTest:
class Button(qt.TQPushButton):
def __init__(self, *args):
- apply(qt.TQPushButton.__init__, (self,) + args)
+ qt.TQPushButton.__init__(*(self,) + args)
class ComboBox(qt.TQHBox):
def __init__(self, parent, caption, items = []):
@@ -56,7 +56,7 @@ class TQtTest:
class FileChooser(qt.TQHBox):
def __init__(self, *args):
- apply(qt.TQHBox.__init__, (self,) + args)
+ qt.TQHBox.__init__(*(self,) + args)
self.defaultfilename = "~/output.html"
self.setSpacing(6)
@@ -119,7 +119,7 @@ class TQtTest:
qt.TQObject.connect(cancelbutton, qt.SIGNAL("clicked()"), self, qt.SLOT("close()"))
def accept(self):
- print "ACCEPTTTTTTTT !!!!!!!!!!!!!!!!!!!!!!!!!!!!"
+ print("ACCEPTTTTTTTT !!!!!!!!!!!!!!!!!!!!!!!!!!!!")
file = qt.TQFile( self.filechooser.file() )
#if not file.exists():
@@ -128,13 +128,13 @@ class TQtTest:
# print "File '%s' does exist." % self.filechooser.file()
def exportButtonClicked(self):
- print "Export to HTML !!!!!!!!!!!!!!!!!!!!!!!!!!!!"
+ print("Export to HTML !!!!!!!!!!!!!!!!!!!!!!!!!!!!")
def __getattr__(self, attr):
- print "=> Dialog.__getattr__(self,attr)"
+ print("=> Dialog.__getattr__(self,attr)")
#def closeEvent(self, ev): pass
def event(self, e):
- print "=> Dialog.event %s" % e
+ print("=> Dialog.event %s" % e)
#self.deleteLater()
#support.swapThreadState() # calls appropriate c-function
return qt.TQDialog.event(self, e)
@@ -143,7 +143,7 @@ class TQtTest:
dialog = Dialog(app.mainWidget(), "Dialog", 1)
dialog.show()
-print "################## BEGIN"
+print("################## BEGIN")
#TkTest()
TQtTest()
-print "################## END"
+print("################## END")