來源自 這裡
Preface :
This module allows one to get any line from any file, while attempting to optimize internally, using a cache, the common case where many lines are read from a single file. This is used by the traceback module to retrieve source lines for inclusion in the formatted traceback.
Supported APIs :
This API defines the following functions :
- linecache.getline(filename, lineno[, module_globals])
- linecache.clearcache()
- linecache.checkcache([filename])
Supplement :
* 29.5. runpy — Locating and executing Python modules
Preface :
This module allows one to get any line from any file, while attempting to optimize internally, using a cache, the common case where many lines are read from a single file. This is used by the traceback module to retrieve source lines for inclusion in the formatted traceback.
Supported APIs :
This API defines the following functions :
- linecache.getline(filename, lineno[, module_globals])
- linecache.clearcache()
- linecache.checkcache([filename])
Supplement :
* 29.5. runpy — Locating and executing Python modules
沒有留言:
張貼留言