Hello all! I study now a method to read all lines from a .c file . I don’t know how to write the function in python in a general way: if I have a directory that contains multiple .c files.
The scenario would be:
Folder name: src
Then file1: TxAcknowledge.c ( let’s say it should be 10 lines of code )
file2: IPcore.c ( 15 lines )
file3: aaabbb.c ( 20 lines )
the script should enter in src folder and check for all *.c files and count and print 10+15+20=45 lines of code as a total.
The path of src folder should be relative because it’s included in different upper paths like Module1\src… or Module2\src…
Thanks for help!