file_lines¶
- pydl.file_lines(path, compress=False)[source]¶
Replicates the IDL
FILE_LINES()
function.Given a path to a file name or a list of such paths, returns the number of lines in the file(s).
- Parameters:
- Returns:
Notes
The
/NOEXPAND_PATH
option in IDL’sFILE_LINES()
is not implemented.References
https://www.nv5geospatialsoftware.com/docs/file_lines.html
Examples
>>> from pydl import file_lines >>> from os.path import dirname, join >>> file_lines(join(dirname(__file__),'tests','t','this-file-contains-42-lines.txt')) 42