Message121051
| Author |
terry.reedy |
| Recipients |
belopolsky, brett.cannon, eli.bendersky, terry.reedy, vstinner |
| Date |
2010年11月12日.17:54:02 |
| SpamBayes Score |
0.00020511878 |
| Marked as misclassified |
No |
| Message-id |
<1289584457.06.0.80240927502.issue10342@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
>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() |
|