Changeset 8:3769f9d260d8
- Timestamp:
- 09/01/13 09:55:36 (8 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
nagslang/data.py
r0 r8 14 14 data_dir = os.path.normpath(os.path.join(data_py, '..', 'data')) 15 15 16 16 17 def filepath(filename): 17 18 '''Determine the path to a file in the data directory. 18 19 ''' 20 # Allow using / as separator in filenames 21 filename = os.path.join(*filename.split('/')) 19 22 return os.path.join(data_dir, filename) 23 20 24 21 25 def load(filename, mode='rb'): … … 25 29 ''' 26 30 return open(os.path.join(data_dir, filename), mode) 27
Note:
See TracChangeset
for help on using the changeset viewer.