Skip to content

Instantly share code, notes, and snippets.

@nu774
Created October 22, 2019 06:00
Show Gist options
  • Save nu774/b839e89c235be6048455276cadb52c7d to your computer and use it in GitHub Desktop.
Save nu774/b839e89c235be6048455276cadb52c7d to your computer and use it in GitHub Desktop.
import os
for path in os.environ['PATH'].split(os.pathsep):
if not path: continue
try:
os.add_dll_directory(os.path.expandvars(path))
except FileNotFoundError:
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment