[issue10342] trace module cannot produce coverage reports for zipped modules

Terry J. Reedy report at bugs.python.org
Fri Nov 12 18:54:17 CET 2010


Terry J. Reedy <tjreedy at udel.edu> added the comment:

>What is the best way to pass around source code?
> - file-like objects, line iterators, readline-like function?

Line iterator (list of lines) as returned by open().readlines.
Memory should not be an issue. Read disk once and close.

with open('file', ...) as f:
  src = f.readlines()

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10342>
_______________________________________


More information about the Python-bugs-list mailing list