LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-05-2005, 05:26 AM   #1
a10392
Member
 
Registered: Sep 2004
Posts: 30

Rep: Reputation: 15
Unhappy python get $HOME directory


Hi,

I'am programming in python, and now i need to get the current $HOME directory of the user.
When each user runs my program it will create a file in $HOME/myfiles/files.html

does anyone knows how to get the $HOME directory in python??

Thanks

MM
 
Old 02-05-2005, 05:42 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
os.environ['HOME'] i believe
 
Old 02-05-2005, 07:07 AM   #3
a10392
Member
 
Registered: Sep 2004
Posts: 30

Original Poster
Rep: Reputation: 15
It works,
Thanks Chris

Regards
MM
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache Root/Home Directory and setting up FTP for home directories? Mankind75 Linux - Newbie 6 07-23-2006 02:37 PM
Checking directory or file exsistance in Python xgreen Programming 10 07-07-2005 10:40 AM
Crawling a directory and executing Python functions. Travis86 Programming 2 07-06-2005 01:06 AM
Python source directory true_atlantis Linux - Newbie 3 11-09-2003 10:58 AM
home directory TX_metalhead Linux - General 6 06-02-2002 01:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration