Writing to a file

Gregory Ewing greg.ewing at canterbury.ac.nz
Fri Mar 25 21:45:28 EDT 2011


John Gordon wrote:

> The write() way is much better.  (However, I'm not sure it will do what
> you were expecting with the tilde in the file path.)

It won't, but the os.path.expanduser() function can
be used to fix that.

-- 
Greg



More information about the Python-list mailing list