Changeset 15494
- Timestamp:
- 07/15/13 16:42:54 (12 years ago)
- Location:
- issm/trunk-jpl/src/m/io
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/io/loadmodel.py
r13947 r15494 1 1 import os.path 2 2 from loadvars import * 3 from whichdb import whichdb 3 4 4 5 def loadmodel(path): … … 12 13 """ 13 14 14 #check existence 15 if os.path.exists(path):15 #check existence of database (independent of file extension!) 16 if whichdb(path): 16 17 #do nothing 17 18 pass -
issm/trunk-jpl/src/m/io/loadvars.py
r13950 r15494 1 1 import shelve 2 2 import os.path 3 from whichdb import whichdb 3 4 4 5 def loadvars(*args): … … 48 49 raise TypeError("Unrecognized input arguments.") 49 50 50 if os.path.exists(filename):51 if whichdb(filename): 51 52 print "Loading variables from file '%s'." % filename 52 53 else:
Note:
See TracChangeset
for help on using the changeset viewer.