ListEnvironments を使用した環境変数の取得

#coding:CP932

import arcpy
from arcpy import env

environments  = arcpy.ListEnvironments()

for environment in environments:
    envSetting = getattr(env, environment)
    print "%-28s: %s" % (environment, envSetting)