/[ascend]/trunk/pygtk/interface/gtkbrowser.py
ViewVC logotype

Diff of /trunk/pygtk/interface/gtkbrowser.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 506 by johnpye, Tue Apr 18 11:55:12 2006 UTC revision 507 by johnpye, Wed Apr 19 02:44:25 2006 UTC
# Line 25  import urlparse Line 25  import urlparse
25  import optparse  import optparse
26  import platform  import platform
27  import sys  import sys
28    import os.path
29    
30  if platform.system() != "Windows":  if platform.system() != "Windows":
31      import dl      import dl
# Line 43  import gtk Line 44  import gtk
44  import gtk.glade  import gtk.glade
45  import pango  import pango
46    
47  print_loading_status("Loading ASCEND python modules...")  print_loading_status("Loading python matplotlib")
48    try:
49        import matplotlib
50    
51        try:
52            print_loading_status("Trying python numpy")
53            import numpy
54            matplotlib.rcParams['numerix'] = 'numpy'  
55            print_loading_status("","Using python module numpy")
56        except ImportError:
57            try:
58                print_loading_status("Trying python numarray")
59                import numarray
60                matplotlib.rcParams['numerix'] = 'numarray'  
61                print_loading_status("","Using python module numarray")
62            except ImportError:
63                try:
64                    print_loading_status("Trying python Numeric")
65                    import Numeric
66                    matplotlib.rcParams['numerix'] = 'Numeric'  
67                    print_loading_status("","Using python module Numeric")
68                except ImportError:
69                    print_loading_status("","FAILED TO LOAD A NUMERIC MODULE FOR PYTHON")
70    
71    except ImportError:
72        print_loading_status("Loading python matplotlib","FAILED TO LOAD MATPLOTLIB")
73    
74    print_loading_status("Loading ASCEND python modules")
75    
76  from preferences import *      # loading/saving of .ini options  from preferences import *      # loading/saving of .ini options
77  from solverparameters import * # 'solver parameters' window  from solverparameters import * # 'solver parameters' window
# Line 131  class Browser: Line 159  class Browser:
159          # set up library path and the path to use for File->Open dialogs          # set up library path and the path to use for File->Open dialogs
160                    
161          if options.library_path != None:          if options.library_path != None:
162              _path = options.library_path              _path = os.path.abspath(options.library_path)
163              _pathsrc = "commandline"              _pathsrc = "commandline"
164              # when a special path is specified, use that as the file-open location              # when a special path is specified, use that as the file-open location
165              self.fileopenpath = options.library_path              self.fileopenpath = _path
166          else:          else:
167              if _prefpath:              if _prefpath:
168                  _path = _prefpath                  _path = _prefpath
# Line 151  class Browser: Line 179  class Browser:
179          #--------          #--------
180          # Create the ASCXX 'Library' object          # Create the ASCXX 'Library' object
181                    
182          print_loading_status("Creating ASCEND 'Library' object")          print_loading_status("Creating ASCEND 'Library' object","PATH = "+_path+" FROM "+_pathsrc)
183          self.library = ascpy.Library(_path)          self.library = ascpy.Library(_path)
184    
185          self.sim = None          self.sim = None

Legend:
Removed from v.506  
changed lines
  Added in v.507

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22