- LineCache caches the line position of a file in the memory. Everytime it access a line, it will seek to the related postion and readline().
Noticing that it may cost some time when you first cache lines of a file.
Usage:
from linecache_light import LineCache
linecache = LineCache(‘a.txt’, cache_suffix=’.cache’)
num_lines = len(linecache)
line_0 = linecache[0]
line_100 = linecache[100]
line_indexing= linecache[[2,3,4,5]]
line_indexing = linecache[-1]
Metadata
Release files for linecache-light 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| linecache-light-0.1.4.linux-x86_64.tar.gz | 3.3 kB | Details |
Release files / linecache-light-0.1.4.linux-x86_64.tar.gz
| Download URL | linecache-light-0.1.4.linux-x86_64.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e63e54fe5d0f534fd8248dc16e8fe084f9c554cf940952af723fe5a7d6920c5b
|
|
BLAKE2b-256 checksum How to use checksums |
d7ec146bb07c8ca9b6e45d85413613800557ad383ac3b3333abbf750f986cdb1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.6.9
|