This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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()
History
Date User Action Args
2010-11-12 17:54:17terry.reedysetrecipients: + terry.reedy, brett.cannon, belopolsky, vstinner, eli.bendersky
2010-11-12 17:54:17terry.reedysetmessageid: <1289584457.06.0.80240927502.issue10342@psf.upfronthosting.co.za>
2010-11-12 17:54:02terry.reedylinkissue10342 messages
2010-11-12 17:54:02terry.reedycreate