Changeset 11787 for issm/trunk-jpl/startup.py
- Timestamp:
- 03/24/12 10:27:17 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/startup.py
r10939 r11787 10 10 import os,sys 11 11 12 13 #First check we are running python 3 at least 14 if sys.version_info[0] < 3: 15 print("ISSM can only work in Python 3. Exiting python") 16 sys.exit(1) 17 12 18 #Recover ISSM_TIER, ISSM_DIR and USERNAME 13 19 ISSM_TIER=os.getenv('ISSM_TIER') … … 20 26 #the variable ISSM_TIER in this file, in case it is not correctly setup. 21 27 22 #ISSM path 23 sys.path.append(ISSM_TIER+'/src/py') 24 sys.path.append(ISSM_TIER+'/src/py/classes') 25 sys.path.append(ISSM_TIER+'/src/py/modules/TriMesh') 26 sys.path.append(ISSM_TIER+'/src/py/modules/hello') 28 #ISSM path. Go through src/py and load everything we find that looks like a python file 29 for root,dirs,files in os.walk(ISSM_TIER+ '/src/py'): 30 for file in files: 31 if file.find(".py") != -1: 32 if file.find(".pyc") == -1: 33 #add to path 34 sys.path.append(root) 35 file=os.path.splitext(file)[0] 36 #__import__(file) 37 38 #Deal with scipy import: 39 import scipy 40 import numpy 41 import nose 42 43 #Import modules that are absolutely needed in ISSM {{{ 27 44 from model import * 45 from mesh import * 46 from mask import * 47 from geometry import * 48 from constants import * 49 from surfaceforcings import * 50 from basalforcings import * 51 from materials import * 52 from friction import * 53 from flowequation import * 54 from fielddisplay import * 55 from timestepping import * 56 from initialization import * 57 from rifts import * 58 from debug import * 59 from settings import * 60 from solver import * 61 #}}} 28 62 29 print "\n To get started with ISSM, type issmdoc at the command prompt.\n\n"63 print("\n To get started with ISSM, type issmdoc at the command prompt.\n\n")
Note:
See TracChangeset
for help on using the changeset viewer.