blob: 64b1d476248af4ae52a9e5caebaa65e4aeaf03b5 [file] [log] [blame]
#!/usr/bin/python
# Dumps environment variables into specified file.
# Format: zero-separated "name=value" pairs in platform encoding.
import os
import sys
if len(sys.argv) != 2:
raise Error('Exactly one argument expected')
f = open(sys.argv[1], 'w')
try:
for key, value in os.environ.items():
f.writelines([key, '=', value, '\0'])
finally:
f.close()