Vincent Danen <[EMAIL PROTECTED]> writes: > Ok, I'm looking a little closer here. If I look at bin/tmda-rfilter, I > see in "def setvuserhomedir" that it's setting os.environ['HOME'] to the > value it's obtaining from the output of -S > > In TMDA/Defaults.py I see it setting: > > HOMEDIR = os.path.expanduser('~') > > I'm not a python programmer by any stretch of the imagination, but > shouldn't HOMEDIR = os.environ['HOME']? Could the expansion of ~ be > looking elsewhere than at the $HOME environment variable (I don't know, > I don't know how that function works).
Here's the description of os.path.expanduser from the docs[1]: expanduser(path) On Unix, return the argument with an initial component of "~" or "~user" replaced by that user's home directory. An initial "~" is replaced by the environment variable HOME if it is set; otherwise the current user's home directory is looked up in the password directory through the built-in module pwd. An initial "~user" is looked up directly in the password directory. On Windows, only "~" is supported; it is replaced by the environment variable HOME or by a combination of HOMEDRIVE and HOMEPATH. If the expansion fails or if the path does not begin with a tilde, the path is returned unchanged. Footnotes: [1] http://docs.python.org/lib/module-os.path.html _____________________________________________ tmda-users mailing list (tmda-users@tmda.net) http://tmda.net/lists/listinfo/tmda-users