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
2
2
3
3
import wx
4
-
4
+
5
5
class MyApp (wx .App ):
6
6
def OnInit (self ):
7
7
@@ -11,20 +11,15 @@ def OnInit(self):
11
11
Dw_i = Dw_mm / 25.4
12
12
Dh_i = Dh_mm / 25.4
13
13
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 ) )
17
17
18
18
dc = wx .ScreenDC ()
19
- print " The system reports : %s PPI" % dc .GetPPI ()
19
+ print ( " The system reports : %s PPI" % dc .GetPPI () )
20
20
21
21
return True
22
-
23
-
24
- app = MyApp (0 )
25
- app .MainLoop ()
26
-
27
-
28
-
29
-
30
22
23
+ if __name__ == '__main__' :
24
+ app = MyApp (1 )
25
+ app .MainLoop ()
You can’t perform that action at this time.
0 commit comments