ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2release_4.0.1ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change
on this file since 167c844 was
167c844,
checked in by Gervaise Alina <gervyh@…>, 16 years ago
|
add comment
|
-
Property mode set to
100644
|
File size:
1.6 KB
|
Line | |
---|
1 | import wx |
---|
2 | #import gui_manager |
---|
3 | from sans.guiframe import gui_manager |
---|
4 | |
---|
5 | # For py2exe, import config here |
---|
6 | import local_config |
---|
7 | import logging |
---|
8 | |
---|
9 | |
---|
10 | class SansView(): |
---|
11 | |
---|
12 | def __init__(self): |
---|
13 | """ |
---|
14 | |
---|
15 | """ |
---|
16 | #from gui_manager import ViewApp |
---|
17 | self.gui = gui_manager.ViewApp(0) |
---|
18 | |
---|
19 | # Add perspectives to the basic application |
---|
20 | # Additional perspectives can still be loaded |
---|
21 | # dynamically |
---|
22 | # Note: py2exe can't find dynamically loaded |
---|
23 | # modules. We load the fitting module here |
---|
24 | # to ensure a complete Windows executable build. |
---|
25 | |
---|
26 | # P(r) perspective |
---|
27 | try: |
---|
28 | import sans.perspectives.pr as module |
---|
29 | fitting_plug = module.Plugin(standalone=False) |
---|
30 | self.gui.add_perspective(fitting_plug) |
---|
31 | except: |
---|
32 | logging.error("SansView: could not find P(r) plug-in module") |
---|
33 | |
---|
34 | # Fitting perspective |
---|
35 | import perspectives.fitting as module |
---|
36 | fitting_plug = module.Plugin() |
---|
37 | self.gui.add_perspective(fitting_plug) |
---|
38 | |
---|
39 | # Splash page perspective |
---|
40 | import perspectives.splashinfo as module |
---|
41 | fitting_plug = module.Plugin() |
---|
42 | self.gui.add_perspective(fitting_plug) |
---|
43 | |
---|
44 | # Build the GUI |
---|
45 | self.gui.build_gui() |
---|
46 | |
---|
47 | # Set the application manager for the GUI |
---|
48 | self.gui.set_manager(self) |
---|
49 | |
---|
50 | # Start the main loop |
---|
51 | self.gui.MainLoop() |
---|
52 | |
---|
53 | |
---|
54 | if __name__ == "__main__": |
---|
55 | sansview = SansView() |
---|
Note: See
TracBrowser
for help on using the repository browser.