-On [20080120 19:34], Christian Heimes ([EMAIL PROTECTED]) wrote: >Most Python developers should the meaning of "~". Should I replace ~ >with $HOME for those who don't have as much experience with Unix as we?
The problem is that ~ is an expansion character. It expands the contents of $HOME. If HOME is set to /usr/local, using ~ will expand to /usr/local. This behaviour is undefined by POSIX, if HOME is null/empty than expanding ~ is undefined. If it is just ~ then it will expand to the contents of HOME, if ~ is followed by a string then it will do a getpwnam() call on the string and expand that to the initial working directory of said login name string. HOME is POSIX-mandated to be '[t]he pathname of the user's home directory'. -- Jeroen Ruigrok van der Werven <asmodai(-at-)in-nomine.org> / asmodai イェルーン ラウフロック ヴァン デル ウェルヴェン http://www.in-nomine.org/ | http://www.rangaku.org/ Hope is the last refuge for mad men and dreamers... _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com