where is os.path.expanduser?

Peter Otten __peter__ at web.de
Thu Mar 23 03:32:00 EST 2006


Kevin F wrote:

> where is this code looking for the .imap file?  I am on OSX and am not
> sure where to put the file it is looking for.
> 
>     f = open(os.path.expanduser('~/.imap'))

Your interactive interpreter has the answer

>>> import os
>>> os.path.expanduser("~")
'/home/peter'

that will most likely differ from the one given above.

Peter



More information about the Python-list mailing list