[Tutor] Linux Home directory

Shitiz Bansal shitizb at yahoo.com
Fri Mar 12 20:54:12 EST 2004


Hi,
The required code is:
 
import commands
x= commands.getstatusoutput('echo $HOME')
 
x[1] gives the value of required directory as string.
 
Shitiz

Mike Wagman <mwagman at charter.net> wrote:
How can I tell using python what the user that is running the softwares
home directory is. I need it so I can finish a linux app and save config
files (etc) in that directory.

Thanks
Mike


_______________________________________________
Tutor maillist - Tutor at python.org
http://mail.python.org/mailman/listinfo/tutor


---------------------------------
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20040312/c7d1bedf/attachment.html


More information about the Tutor mailing list