Index: ../trunk-jpl/src/m/dev/devpath.py =================================================================== --- ../trunk-jpl/src/m/dev/devpath.py (revision 23754) +++ ../trunk-jpl/src/m/dev/devpath.py (revision 23755) @@ -1,16 +1,16 @@ #!/usr/bin/env python -import os,sys +import os, sys import warnings #Recover ISSM_DIR and USERNAME ISSM_DIR = os.getenv('ISSM_DIR') USERNAME = os.getenv('USER') -JPL_SVN = os.getenv('JPL_SVN') -if(ISSM_DIR==None): +JPL_SVN = os.getenv('JPL_SVN') +if ISSM_DIR is None: raise NameError('"ISSM_DIR" environment variable is empty! You should define ISSM_DIR in your .cshrc or .bashrc!') #Go through src/m and append any directory that contains a *.py file to PATH -for root,dirs,files in os.walk(ISSM_DIR+ '/src/m'): +for root, dirs, files in os.walk(ISSM_DIR + '/src/m'): if '.svn' in dirs: dirs.remove('.svn') for file in files: @@ -25,11 +25,11 @@ sys.path.append(ISSM_DIR + '/lib') sys.path.append(ISSM_DIR + '/src/wrappers/python/.libs') # If using clusters, we need to have the path to the cluster settings directory -if(JPL_SVN!=None): +if JPL_SVN is not None: if os.path.exists(JPL_SVN + '/usr/' + USERNAME): sys.path.append(JPL_SVN + '/usr/' + USERNAME) else: - warnings.warn('cluster settings should be in, '+ JPL_SVN +'/usr/' + USERNAME) + warnings.warn('cluster settings should be in, {}/usr/{}'.format(JPL_SVN, USERNAME)) #Manual imports for commonly used functions from runme import runme #first because plotmodel may fail @@ -42,4 +42,4 @@ #c.InteractiveShellApp.exec_lines.append('print "Warning: disable autoreload in startup.py to improve performance." ') print("\n ISSM development path correctly loaded") -print(("Current path is {}\n\n".format(ISSM_DIR))) +print("Current path is {}\n\n".format(ISSM_DIR))