#----------------------------------------------------------------------
 
-class MyApp(wxApp):
-    def OnInit(self):
-        frame = MyParentFrame()
-        frame.Show(true)
-        self.SetTopWindow(frame)
-        return true
-
-
-app = MyApp(0)
-app.MainLoop()
+if __name__ == '__main__':
+    class MyApp(wxApp):
+        def OnInit(self):
+            wxInitAllImageHandlers()
+            frame = MyParentFrame()
+            frame.Show(true)
+            self.SetTopWindow(frame)
+            return true
+
+
+    app = MyApp(0)
+    app.MainLoop()