Rework gui/__init__.py imports
authorW. Trevor King <wking@drexel.edu>
Sat, 24 Jul 2010 11:18:57 +0000 (07:18 -0400)
committerW. Trevor King <wking@drexel.edu>
Sat, 24 Jul 2010 11:18:57 +0000 (07:18 -0400)
hooke/ui/gui/__init__.py
hooke/ui/gui/libhooke.py
hooke/ui/gui/panel/__init__.py [new file with mode: 0644]
hooke/ui/gui/panel/commands.py [moved from hooke/ui/gui/panels/commands.py with 100% similarity]
hooke/ui/gui/panel/note.py [moved from hooke/ui/gui/panels/note.py with 100% similarity]
hooke/ui/gui/panel/perspectives.py [moved from hooke/ui/gui/panels/perspectives.py with 100% similarity]
hooke/ui/gui/panel/playlist.py [moved from hooke/ui/gui/panels/playlist.py with 100% similarity]
hooke/ui/gui/panel/plot.py [moved from hooke/ui/gui/panels/plot.py with 100% similarity]
hooke/ui/gui/panel/propertyeditor.py [moved from hooke/ui/gui/panels/propertyeditor.py with 100% similarity]
hooke/ui/gui/panel/results.py [moved from hooke/ui/gui/panels/results.py with 100% similarity]
hooke/ui/gui/panels/__init__.py [deleted file]

index 153b06dd9f0ff9f905cf9bcbfdf4ab8fd7688814..db64594719090084e3e77258d2b64ae2a4a35358 100644 (file)
@@ -3,11 +3,11 @@
 """Defines :class:`GUI` providing a wxWindows interface to Hooke.\r
 """\r
 \r
-import lib.libhooke as lh\r
+WX_GOOD=['2.6','2.8']\r
+\r
 import wxversion\r
-wxversion.select(lh.WX_GOOD)\r
+wxversion.select(WX_GOOD)\r
 \r
-from configobj import ConfigObj\r
 import copy\r
 import os.path\r
 import platform\r
@@ -15,53 +15,24 @@ import shutil
 import time\r
 \r
 import wx.html\r
-import wx.lib.agw.aui as aui\r
+import wx.aui as aui\r
 import wx.lib.evtmgr as evtmgr\r
-import wx.propgrid as wxpg\r
+\r
+# wxPropertyGrid included in wxPython >= 2.9.1, until then, see\r
+#   http://wxpropgrid.sourceforge.net/cgi-bin/index?page=download\r
+# until then, we'll avoid it because of the *nix build problems.\r
+#import wx.propgrid as wxpg\r
 \r
 from matplotlib.ticker import FuncFormatter\r
 \r
-from configobj import __version__ as configobj_version\r
-from matplotlib import __version__ as mpl_version\r
-from numpy import __version__ as numpy_version\r
-from scipy import __version__ as scipy_version\r
-from sys import version as python_version\r
-from wx import __version__ as wx_version\r
-from wx.propgrid import PROPGRID_MAJOR\r
-from wx.propgrid import PROPGRID_MINOR\r
-from wx.propgrid import PROPGRID_RELEASE\r
-\r
-try:\r
-    from agw import cubecolourdialog as CCD\r
-except ImportError: # if it's not there locally, try the wxPython lib.\r
-    import wx.lib.agw.cubecolourdialog as CCD\r
-\r
-#set the Hooke directory\r
-lh.hookeDir = os.path.abspath(os.path.dirname(__file__))\r
-from config.config import config\r
-import drivers\r
-import lib.clickedpoint\r
-import lib.curve\r
-import lib.delta\r
-import lib.playlist\r
-import lib.plotmanipulator\r
+from ..command import CommandExit, Exit, Command, Argument, StoreValue\r
+from ..interaction import Request, BooleanRequest, ReloadUserInterfaceConfig\r
+from ..ui import UserInterface, CommandMessage\r
+\r
 import lib.prettyformat\r
-import panels.commands\r
-import panels.note\r
-import panels.perspectives\r
-import panels.playlist\r
-import panels.plot\r
-import panels.propertyeditor\r
-import panels.results\r
-import plugins\r
-\r
-global __version__\r
-global __codename__\r
-global __releasedate__\r
-__version__ = lh.HOOKE_VERSION[0]\r
-__codename__ = lh.HOOKE_VERSION[1]\r
-__releasedate__ = lh.HOOKE_VERSION[2]\r
-__release_name__ = lh.HOOKE_VERSION[1]\r
+import .panel as panel\r
+\r
+\r
 \r
 ID_About = wx.NewId()\r
 ID_Next = wx.NewId()\r
index 3e48f9270540d8d534ce04bc5a7141c20737c743..17dbf6a35d5c7578385134a4a3eb50f736b0718e 100644 (file)
@@ -18,7 +18,7 @@ import numpy
 import scipy
 
 HOOKE_VERSION=['0.9.0_devel', 'Kenzo', '2010-01-31']
-WX_GOOD=['2.6','2.8']
+
 hookeDir=''
 
 #constants for 'special' curves
diff --git a/hooke/ui/gui/panel/__init__.py b/hooke/ui/gui/panel/__init__.py
new file mode 100644 (file)
index 0000000..26664e8
--- /dev/null
@@ -0,0 +1,12 @@
+# Copyright\r
+\r
+import .commands as commands\r
+import .note as note\r
+import .perspectives as perspectives\r
+import .playlist as playlist\r
+import .plot as plot\r
+import .propertyeditor as propertyeditor\r
+import .results as results\r
+\r
+__all__ = [commands, note, perspectives, playlist, plot, propertyeditor,\r
+           results]\r
diff --git a/hooke/ui/gui/panels/__init__.py b/hooke/ui/gui/panels/__init__.py
deleted file mode 100644 (file)
index 803f29c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#!/usr/bin/env python\r