Terry J. Reedy <[email protected]> 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 <[email protected]>
<http://bugs.python.org/issue10342>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com