/LessLine

Less line to read text file

Primary LanguagePythonMIT LicenseMIT

LessLine

Less line to read&write text file

Requirements

  • Python >= 3.6

Installation

$ pip install lessline

Example

from lessline.text_file import read, write

file = 'demo.txt'
text = 'Hello word!\nThis is lessline!'
write(text, file)

text_new = read(file)
print(len(text_new), text_new)