Created
December 13, 2019 15:51
-
-
Save paduel/2daa781ec2c814b8c2c2bd7b4c065182 to your computer and use it in GitHub Desktop.
Add the current folder to the Python modules path
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import os | |
for line in sys.path: | |
if line.endswith('site-packages'): | |
print(line) | |
lib_path = line | |
file = os.path.join(lib_path, 'accurate_modules.pth') | |
with open(file, 'a') as path_file: | |
path_file.write(os.getcwd()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment