X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d14a1e28567de23c586bc80017073d0c39f8d18f..0a5bb138a71dfc1c706fc0858fb2801500e2c2e8:/wxPython/wx/tools/img2png.py diff --git a/wxPython/wx/tools/img2png.py b/wxPython/wx/tools/img2png.py index 60201a4cf3..69fa69c12d 100644 --- a/wxPython/wx/tools/img2png.py +++ b/wxPython/wx/tools/img2png.py @@ -8,9 +8,13 @@ # Copyright: (c) 2002 by Total Control Software # Licence: wxWindows license #---------------------------------------------------------------------- +# 12/21/2003 - Jeff Grimmett (grimmtooth@softhome.net) +# +# o V2.5 compatability update +# """ -img2png.py -- convert several image formats to PNG format +img2png.py -- convert several image formats to PNG format. Usage: @@ -32,15 +36,17 @@ Options: """ -import sys -import img2img -from wxPython import wx +import sys +import wx +import img2img +app = None def main(): # some bitmap related things need to have a wxApp initialized... - if wx.wxGetApp() is None: - app = wx.wxPySimpleApp() - img2img.main(sys.argv[1:], wx.wxBITMAP_TYPE_PNG, ".png", __doc__) + if wx.GetApp() is None: + global app + app = wx.PySimpleApp() + img2img.main(sys.argv[1:], wx.BITMAP_TYPE_PNG, ".png", __doc__) if __name__ == '__main__': main()