1 # -*- coding: utf-8 -*-
4 printLn("Testing Variadic Functions!\n", 1, " + ", 2, " = ", 1+2)
5 printLn("Pi = ", 3.141592653589)
10 displayDriver = "OpenGL",
11 caption = I18N("Hello, Python!!"),
15 borderStyle = BorderStyle.sizable,
16 clientSize = Size(640, 480),
17 background = Color(b = 255),
18 foreground = Color(r = 235, b = 115, g = 200),
19 font = FontResource("Merriweather", 30, outlineSize = 4.0, outlineFade = 0.2) )
21 def myOnRedraw(self, surface):
22 surface.writeTextf(20, 20, I18N("Writing Stuff on the wall!!"))
23 self.onDrawOverChildren = myOnRedraw
25 def button1Clicked(self, button, x, y, mods):
26 printLn("I got pushed! (master is ", self.caption, ")")
27 self.background = Color(b = 255, g = 192, r = 64)
28 MessageBox(caption = I18N("Hello, Python!"), contents = I18N("Python is pretty nifty.")).modal()
31 self.picture1 = Picture(parent = self, anchor = Anchor(0,0,0,0), image = BitmapResource("C:/Users/Jerome/Desktop/khaleesi.png"))
33 self.button1 = Button(
36 position = Point(80,80),
37 font = FontResource("Merriweather", 30),
38 notifyClicked = button1Clicked )
43 caption = "Bindings are cool, 詠春 too!",
45 clientSize = Size(320, 200),
46 background = Color(255) )