Intended behaviour of add_pathlist_to_PYTHONPATH not clear
See original GitHub issueWhat is the intended behaviour is of the function add_pathlist_to_PYTHONPATH()
in spyder.utils.misc
? That function is used in the unittest plugin, but I’m not sure what it is supposed to do and whether it is used correctly in the plugin.
This is prompted by the following comment in PR spyder-ide/spyder-unittest#150 (but I remember that I was puzzled by this in the past):
I’m not sure if this isn’t a logic flaw in
add_pathlist_to_PYTHONPATH
: I think ifipyconsole
isFalse
it should look forPYTHONPATH
not in the actual OS environment but in the passed-inenv
list.
This function is ten years old and added in commit eeb594aec07ac6d854177179fcf226febd3379e3 by Pierre.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
python subprocess Popen environment PATH? - Stack Overflow
I meant to say that the directory from which python is executed, that directory is added to pythonpath. Here in the 2nd case,...
Read more >Using PYTHONPATH — Functional MRI methods
The PYTHONPATH variable has a value that is a string with a list of directories that Python should add to the sys.path directory...
Read more >site — Site-specific configuration hook — Python 3.11.1 ...
Non-existing items are never added to sys.path , and no check is made that the item refers to a directory rather than a...
Read more >How to set $PATH persistently? #527 - fish-shell/fish ... - GitHub
I try set -U PATH ~/.cabal/bin $PATH which sets it in the shell I type it in, but not any new shells I...
Read more >Understanding the Python Path Environment Variable in Python
PYTHONPATH variable includes various directories as a string to be added to the sys.path directory list. So, with PYTHONPATH, users can import ...
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
It looks much better now, thanks!
Great! I think the original intent of that function was the one I left in PR #14022.
The problem is I hijacked it to use it in our kernelspec several years ago.