Skip to main content
Help improve PyPI by participating in a 5-minute user interface survey!

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).

Release history Release notifications

This version
History Node

0.1.1

History Node

0.1.0

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
indexedlines-0.1.1.tar.gz (2.4 kB) Copy SHA256 hash SHA256 Source None Dec 22, 2016

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page