readLines

readLines(con)

Read some or all text lines from a file.

Parameters

Name Type Description Default
con str Path to the file required

Returns

Name Type Description
List[str] a list of character strings

Examples

>>> from rlike import *
>>> f = writeLines(text = 'Hello world. Some more text.', con = 'fname.txt')
>>> x = readLines('fname.txt')
>>> x
['Hello world. Some more text.']
>>> f = writeLines(text = ['I', 'want', 'to', 'break free.'], con = 'fname.txt')
>>> x = readLines('fname.txt')
>>> x
['I', 'want', 'to', 'break free.']