Changeset 23754
- Timestamp:
- 02/26/19 08:02:26 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/dev/devpath.py
r23718 r23754 8 8 JPL_SVN = os.getenv('JPL_SVN') 9 9 if(ISSM_DIR==None): 10 10 raise NameError('"ISSM_DIR" environment variable is empty! You should define ISSM_DIR in your .cshrc or .bashrc!') 11 11 12 12 #Go through src/m and append any directory that contains a *.py file to PATH 13 13 for root,dirs,files in os.walk(ISSM_DIR+ '/src/m'): 14 15 16 17 18 19 20 14 if '.svn' in dirs: 15 dirs.remove('.svn') 16 for file in files: 17 if file.find(".py") != -1: 18 if file.find(".pyc") == -1: 19 if root not in sys.path: 20 sys.path.append(root) 21 21 22 22 #Also add the Nightly run directory … … 27 27 # If using clusters, we need to have the path to the cluster settings directory 28 28 if(JPL_SVN!=None): 29 30 31 32 29 if os.path.exists(JPL_SVN + '/usr/' + USERNAME): 30 sys.path.append(JPL_SVN + '/usr/' + USERNAME) 31 else: 32 warnings.warn('cluster settings should be in, '+ JPL_SVN +'/usr/' + USERNAME) 33 33 34 34 #Manual imports for commonly used functions
Note:
See TracChangeset
for help on using the changeset viewer.