3 # Dumps environment variables into specified file.
4 # Format: zero-separated "name=value" pairs in platform encoding.
10 raise Exception('Exactly one argument expected')
12 f = open(sys.argv[1], 'wb')
14 for key, value in os.environ.items():
15 s = '%s=%s\0' % (key, value)
16 f.write(s.encode('utf-8'))