Changeset 12657


Ignore:
Timestamp:
07/18/12 18:58:02 (13 years ago)
Author:
cborstad
Message:

skip .svn directories in os.walk call

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/startup.py

    r12616 r12657  
    2222#ISSM path. Go through src/py and load everything we find  that looks like a python file
    2323for root,dirs,files in os.walk(ISSM_DIR+ '/src/py'):
     24        if '.svn' in dirs:
     25                dirs.remove('.svn')
    2426        for file in files:
    2527                if file.find(".py") != -1:
     
    2729                                #add to path
    2830                                sys.path.append(root)
     31                                print root, "\n"
    2932                                file=os.path.splitext(file)[0]
    3033                                #__import__(file)
    3134
    3235for root,dirs,files in os.walk(ISSM_DIR+ '/src/m'):
     36        if '.svn' in dirs:
     37                dirs.remove('.svn')
    3338        for file in files:
    3439                if file.find(".py") != -1:
     
    3641                                #add to path
    3742                                sys.path.append(root)
     43                                print root, "\n"
    3844                                file=os.path.splitext(file)[0]
    3945                                #__import__(file)
Note: See TracChangeset for help on using the changeset viewer.