X-Git-Url: http://git.tremily.us/?a=blobdiff_plain;f=doc%2Fuser%2Fenvironments.xml;h=8f62b3bf2bb649be1b3b99307deb5b6b20118bbc;hb=9c08098a9522379f50983e9f54eda769db351513;hp=0746793bbdc2f7749a6d3873791d7dc4df3f18e7;hpb=fbcc0788e977dc6ad92994ae7bb2144d10b36a1b;p=scons.git diff --git a/doc/user/environments.xml b/doc/user/environments.xml index 0746793b..8f62b3bf 100644 --- a/doc/user/environments.xml +++ b/doc/user/environments.xml @@ -672,11 +672,8 @@ environment, of directory names, suffixes, etc. env = Environment() - dict = env.Dictionary() - keys = dict.keys() - keys.sort() - for key in keys: - print "construction variable = '%s', value = '%s'" % (key, dict[key]) + for item in sorted(env.Dictionary().items()): + print "construction variable = '%s', value = '%s'" % item @@ -1543,11 +1540,10 @@ environment, of directory names, suffixes, etc. #!/usr/bin/env python import os import sys - if len(sys.argv) > 1: + if len(sys.argv) > 1: keys = sys.argv[1:] else: - keys = os.environ.keys() - keys.sort() + keys = sorted(os.environ.keys()) for key in keys: print " " + key + "=" + os.environ[key]