Skip to content

xfoobar/readlargefile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Large text file reader.

install

pip install readlargefile

usage:

from readlargefile.line_reader import LineReader
# max_line: Maximum length of the line
# sep: Separate byte, default '\n'
with LineReader(file_name, max_line, sep) as reader:
    # line is <class 'bytes'>
    for line in reader:
        if line:
            print(line)
        elif line == b'':
            print('empty line.')
        else:
            # line == None
            print('line is too long.')

About

Large file reading module developed by Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages