os.getenv()

>>> import os
>>> os.getenv( "HOME")
'/home/p15user'