Skip to content

Instantly share code, notes, and snippets.

@wallymathieu
Created October 9, 2014 08:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wallymathieu/1888ad341b3985f4ded5 to your computer and use it in GitHub Desktop.
Save wallymathieu/1888ad341b3985f4ded5 to your computer and use it in GitHub Desktop.
exec.py in sublime text 2
# Set temporary PATH to locate executable in arg_list
if path:
old_path = os.environ["PATH"]
# The user decides in the build system whether he wants to append $PATH
# or tuck it at the front: "$PATH;C:\\new\\path", "C:\\new\\path;$PATH"
os.environ["PATH"] = ";".join( map(lambda p:p.encode(sys.getfilesystemencoding()), os.path.expandvars(path)))
@wallymathieu
Copy link
Author

Might be totally wrong though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment