HOME Directory in posix and nt

Riccardo Galli riccardo_togli.questo at e.questo_sideralis.net
Sun Aug 3 09:23:22 EDT 2003


On Sun, 03 Aug 2003 13:49:39 +0200, Jörg Maier wrote:

> Hey,
> 
> ist there a possibility to get the users homedirectory as environment
> variables %HOMEPATH% or $HOME. there must be a way to see system variables
> other than 
> stdout = os.popen('{ echo $HOME } 2>&1 ', 'r') on posix and
> stdout = os.popen('echo %HOMEPATH% 2>&1', 'r')
> with
> home = stdout.readline()
> ???

os.getenv(ENV_VARIABLE)

Ciao,
Riccardo

-- 
-=Riccardo Galli=-

 _,e.
s~  ``
 ~@.   ideralis Programs
.   ol 
 `**~  http://www.sideralis.net




More information about the Python-list mailing list