File tree Expand file tree Collapse file tree 1 file changed +9
-14
lines changed
Expand file tree Collapse file tree 1 file changed +9
-14
lines changed Original file line number Diff line number Diff line change 1- #!/usr/bin/env python2.4
1+ #!/usr/bin/env python
22
33import wx
4-
4+
55class MyApp (wx .App ):
66 def OnInit (self ):
77
@@ -11,20 +11,15 @@ def OnInit(self):
1111 Dw_i = Dw_mm / 25.4
1212 Dh_i = Dh_mm / 25.4
1313
14- print "The display is %i by %i pixels" % (Dw , Dh )
15- print "The display is %i by %i inches" % (Dw_i , Dh_i )
16- print "resulting in %i by %i ppi" % (Dw / Dw_i , Dh / Dh_i )
14+ print ( "The display is %i by %i pixels" % (Dw , Dh ) )
15+ print ( "The display is %i by %i inches" % (Dw_i , Dh_i ) )
16+ print ( "resulting in %i by %i ppi" % (Dw / Dw_i , Dh / Dh_i ) )
1717
1818 dc = wx .ScreenDC ()
19- print " The system reports : %s PPI" % dc .GetPPI ()
19+ print ( " The system reports : %s PPI" % dc .GetPPI () )
2020
2121 return True
22-
23-
24- app = MyApp (0 )
25- app .MainLoop ()
26-
27-
28-
29-
3022
23+ if __name__ == '__main__' :
24+ app = MyApp (1 )
25+ app .MainLoop ()
You can’t perform that action at this time.
0 commit comments