| Home | Trees | Indices | Help |
|---|
|
|
1 # -*- mode: python; tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4; -*- 2 # vim:ft=python:et:sw=4:ts=4 3 4 """ 5 Environment variables. 6 """ 7 8 import os 911 """ 12 Get the value from a prioritized ordering of environment 13 variables. 14 15 @param names: The names of the environment variables to scan. 16 @type names: str 17 18 @return: The value of the first variable that is set, or None if 19 none are set. 20 @rtype: str 21 """ 22 for name in names: 23 try: 24 return os.environ[ name ] 25 except KeyError: 26 pass 27 else: 28 return None29
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Sat Apr 17 20:45:15 2010 | http://epydoc.sourceforge.net |