Changeset 5359 for anuga_core/source
- Timestamp:
- May 23, 2008, 2:06:02 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/caching/caching.py
r4817 r5359 42 42 # Determine platform 43 43 # 44 from os import getenv 45 44 46 import os 45 47 if os.name in ['nt', 'dos', 'win32', 'what else?']: … … 48 50 unix = 1 49 51 52 cache_dir = '.python_cache' 50 53 # Make default caching directory name 51 54 # 52 55 if unix: 53 homedir = '~' 56 homedir = getenv('INUNDATIONHOME') 57 if homedir is None: 58 homedir = '~' 59 else: 60 homedir = homedir + os.sep + '.cache' 61 # Since homedir will be a group area, individually label the caches 62 user = getenv('LOGNAME') 63 if user is not None: 64 cache_dir += '_' + user 65 54 66 CR = '\n' 55 67 else: … … 57 69 CR = '\r\n' #FIXME: Not tested under windows 58 70 59 cachedir = homedir + os.sep + '.python_cache'+ os.sep71 cachedir = homedir + os.sep + cache_dir + os.sep 60 72 61 73 # ----------------------------------------------------------------------------- … … 2413 2425 #sys.exit() 2414 2426 raise StandardError 2427 2428 #------------------------------------------------------------- 2429 if __name__ == "__main__": 2430 pass
Note: See TracChangeset
for help on using the changeset viewer.