An example for a question.
File structure
foo_folder | bar_module.py | |___foo_func | |____init___ python application folder |___python_solution.sln, .proj ... |___python_application.py
bar_module.py:
def foo_func(): return 3.14
python_application.py
from clients.reddit import foo_module if __name__ == '__main__': print(foo_module.foo_func())
I have a solution with a project and one .py file. The file in this project imports the module outside the project. Now it works in PowerShell. But this is not the case in Visual Studio. These are the problems:
I cannot run this code from Visual Studio because I am getting an import error.
Intellisense is not working. When I work in python_application.py, there is no intellisense .
Now I understand that I can add bar_module.py to the project, but this makes a local copy that I don't want. What do I need to change to run this code from Visual Studio and get Intellisense to work?
source share