/[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 478 by johnpye, Mon Apr 17 08:10:48 2006 UTC revision 479 by johnpye, Mon Apr 17 08:49:14 2006 UTC
# Line 21  except ImportError: Line 21  except ImportError:
21  print_loading_status("Loading python standard libraries")  print_loading_status("Loading python standard libraries")
22    
23  import re  import re
 import preferences # loading/saving of .ini options  
24  import urlparse  import urlparse
25  import optparse  import optparse
26  import platform  import platform
# Line 43  import pango Line 42  import pango
42    
43  print_loading_status("Loading ASCEND python modules...")  print_loading_status("Loading ASCEND python modules...")
44    
45    from preferences import *      # loading/saving of .ini options
46  from solverparameters import * # 'solver parameters' window  from solverparameters import * # 'solver parameters' window
47  from help import *             # viewing help files  from help import *             # viewing help files
48  from incidencematrix import *  # incidence/sparsity matrix matplotlib window  from incidencematrix import *  # incidence/sparsity matrix matplotlib window
# Line 120  class Browser: Line 120  class Browser:
120    
121          print_loading_status("Loading preferences")          print_loading_status("Loading preferences")
122    
123          self.prefs = preferences.Preferences()          self.prefs = Preferences()
124    
125          #--------          #--------
126          # initialise ASCEND          # initialise ASCEND
127    
         print_loading_status("Creating ASCEND 'Library' object")  
   
128          self.assets_dir = options.assets_dir          self.assets_dir = options.assets_dir
129                    
130          _prefpath = self.prefs.getStringPref("Directories","librarypath",None)          _prefpath = self.prefs.getStringPref("Directories","librarypath",None)
131                    
132          if _prefpath:          if _prefpath:
133              _path = _prefpath              _path = _prefpath
134              print "SETTING ASCENDLIBRARY from preferences:",_path              _pathsrc = "user preferences"
             self.library = ascpy.Library(_prefpath)  
135          else:          else:
136              options.library_path              _path = options.library_path
137              print "PYTHON SAYS DEFAULT LIBRARY IS",options.library_path              if options.library_path==config.LIBRARY_PATH:
138              print "WE WILL LET THE ENGINE DECIDE..."                  _pathsrc = "default (config.py)"
139              self.library = ascpy.Library(options.library_path)                else:
140                    _pathsrc = "commandline"
141                
142            print_loading_status("Creating ASCEND 'Library' object",
143                "From %s, using ASCENDLIBRARY = %s" % (_pathsrc,_path)
144    
145            )
146            self.library = ascpy.Library(_path)
147    
148          self.sim = None          self.sim = None
149    

Legend:
Removed from v.478  
changed lines
  Added in v.479

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