Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 19 lines (14 sloc) 0.361 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#!/usr/bin/python

import os
import sys


def main(args):
    fh = open(args[0])
    for line in fh:
        if "=" not in line:
            raise Exception("Bad line: %r" % line)
        key, val = line.rstrip("\n").split("=", 2)
        os.environ[key] = val
    fh.close()
    os.execvp(args[1], args[1:])


if __name__ == "__main__":
    main(sys.argv[1:])
Something went wrong with that request. Please try again.