Skip to main content

A convenience list-like object that allows random access tolines of a text file.

Project description

Copyright (c) 2016 Luís Gomes

indexedlines implements a list-like immutable view over lines of text files. In other words, it allows access to any line given it’s zero-based index. Thus, if you have a big text file and you want to get line number 100001, you don’t have to read the first 100000 sentences before getting that one.

Of course there are no free lunches, and this module needs to compute a list of sentence offsets beforehand (which is saved to disk when a indexedlines object is created for the first time).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

indexedlines-0.1.1.tar.gz (2.4 kB view details)

Uploaded Source

File details

Details for the file indexedlines-0.1.1.tar.gz.

File metadata

File hashes

Hashes for indexedlines-0.1.1.tar.gz
Algorithm Hash digest
SHA256 527acb964656eb5dd2c83b641259f0967536285744a9ce624a07bd287bf684af
MD5 bcb2a057b58123e25dedadfefe3a2a2a
BLAKE2b-256 5081f536d40b1db901f5c8054a925c78138cc1b4025b5df4dc3499fdd31c9b23

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page