File directory added to sys.path on every change
See original GitHub issueThis seem to not happen when there is no import.
import sys
print (sys.path)
from something import *
Python 3.6.7 OS: nixos 18.09.1789.11c9922a7d5 (Jellyfish)
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Best way to add to sys.path relative to the current running script
This is what I use: import os, sys sys.path.append(os.path.join(os.path.dirname(__file__), "lib")).
Read more >Check and add the module search path with sys.path in Python
Since the module search path changes depending on the current directory, the import may not work depending on where the script file is...
Read more >Dynamically Changing the Python Search Path - O'Reilly
sys.path is a list, so it's easy to add directories to its end, using sys.path.append . Every import performed ...
Read more >sys.path in Python - GeeksforGeeks
sys.path is a built-in variable within the sys module. It contains a list of directories that the interpreter will search in for the ......
Read more >The initialization of the sys.path module search path — Python ...
The PYTHONPATH environment variable is often used to add directories to the search path. If this environment variable is found then the contents...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixed. I just need a try/finally around the yield in script_path
it’s a problem with the script_path function in the backend. It inserts into the path each execution.