specman

Specman how to read a specific line from a file, with no loop


I have a long file, and I want to read a specific line not from the first sequence lines. is there a way to do it without looping all over the file and counting the lines?

For example files.read, which get an index from which line to read?

Thanks


Solution

  • You can use the predefined method files.get_text_lines().