API Documentation - le717/linescan.py GitHub Wiki
The API has been intentionally kept simple to make linescan.py easy to use. Example of these functions can be found in the tests directory.
linescan.scan()
Parameters
- {String}
file_name- The file to be scanned. - {Integer}
start_line- The line number where to begin scanning. - {Integer|String}
[end_line="end"]- The line number where to end scanning. Passing the string"end"will scan fromstart_lineto the end of the file. - {String}
[encoding=None]- Specify a file encoding to use. Defaults to the value oflocale.getpreferredencoding(False)if set toNone.
Return
- {String|Boolean} - The lines scanned or
Falseif an error was raised and exceptions are not enabled.
linescan.show_errors()
Parameters
- {Boolean}
[enable=False]- Passing a value ofTrueenables exception raising. Passing a value ofFalsewill restore default error handling behavior.
Return
- No return value.