can't run py app after compile to exe by py2exe , gettext
ulysses
ulysses_dm at yahoo.com.cn
Wed Nov 12 20:00:15 EST 2003
I do a small test app for this. Still can't run.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#!/usr/bin/env python
#Boa:App:BoaApp
from wxPython.wx import *
def setLan():
import gettext
lan=gettext.GNUTranslations(open('en.mo'))
lan.install()
class BoaApp(wxApp):
def OnInit(self):
wxInitAllImageHandlers()
setLan()
self.main = wxFrame1(None)
# needed when running from Boa under Windows 9X
self.SetTopWindow(self.main)
self.main.Show();self.main.Hide();self.main.Show()
return True
class wxFrame1(wxFrame):
def __init__(self, parent):
wxFrame.__init__(self, id=-1, name='', parent=parent,
pos=wxPoint(193, 111), size=wxSize(505, 223),
style=wxDEFAULT_FRAME_STYLE, title='wxFrame1')
self.SetClientSize(wxSize(497, 196))
self.SetBackgroundColour(wxColour(192, 192, 192))
self.SetFont(wxFont(14, wxSWISS, wxNORMAL, wxNORMAL, False, 'Tahoma'))
self.staticText2 = wxStaticText(id=2222,
label=_('help me'), name='staticText2', parent=self, pos=wxPoint(72,
128), size=wxSize(336, 40), style=0)
self.staticText1 = wxStaticText(id=3333,
label=_('show text'), name='staticText1', parent=self,
pos=wxPoint(72, 56), size=wxSize(320, 48), style=0)
def main():
application = BoaApp(0)
application.MainLoop()
if __name__ == '__main__':
main()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
full source package
please download from
http://211.90.187.42/ourbt/gettexttest.rar
you test in in your computer. Thanks.
Ulysses
More information about the Python-list
mailing list