File: wxApp1.py

package info (click to toggle)
boa-constructor 0.3.0-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 8,188 kB
  • ctags: 8,857
  • sloc: python: 54,163; sh: 66; makefile: 36
file content (27 lines) | stat: -rw-r--r-- 679 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env python
#Boa:App:BoaApp

from wxPython.wx import *

import wxFrame1

modules ={'wxFrame1': [1, 'Main frame of Application', 'wxFrame1.py'],
 'wxPanel1': [0, '', 'wxPanel1.py'],
 'wxPanel2': [0, '', 'wxPanel2.py'],
 'wxPanel3': [0, '', 'wxPanel3.py']}

class BoaApp(wxApp):
    def OnInit(self):
        wxInitAllImageHandlers()
        self.main = wxFrame1.create(None)
        #workaround for running in wxProcess
        self.main.Show();self.main.Hide();self.main.Show()
        self.SetTopWindow(self.main)
        return true

def main():
    application = BoaApp(0)
    application.MainLoop()

if __name__ == '__main__':
    main()