Are there any Python people here?
How do I do the equivalent of the C below in Python :-
while ( (str = read(file)) != NULL) { do something; }
I can read the data OK, i.e. I have opened the file and I can successfully read from the file with the line:-
tagNum = tlvFile.read(3)
but I don't see how to make that part of a for/while loop that exits at the end of the file. I can't use an iterator because the file is read in variable length chunks whose length depends on context.