plain text parsing to html (newbie problem)
Lie Ryan
lie.1296 at gmail.com
Thu Dec 10 14:55:25 EST 2009
On 12/10/2009 11:17 PM, João wrote:
> Thanks for the output.
> akean, I've installed ipython and I'm exploring it. Thanks.
>
> Terry,
> from what I've read stringIO allows us to store strings in a 'virtual'
> file.
> Can you please write just 2 lines exemplifying a write to and a read
> from an OS level file?
>
> MRAB, that 'mail' object should've been the os level 'mail' file. But
> as I'm a beginner I was using it wrong..
it's actually easier to use real files than creating a virtual file:
f = open('mail.txt', 'w')
f.write("foo\n") # or print >> f, "foo"
and, is there any reason why you're not using the email and smtplib?
http://docs.python.org/library/email-examples.html
More information about the Python-list
mailing list