René's URL Explorer Experiment


Title: Improve configuration for search paths · Issue #6544 · microsoft/vscode-python · GitHub

Open Graph Title: Improve configuration for search paths · Issue #6544 · microsoft/vscode-python

X Title: Improve configuration for search paths · Issue #6544 · microsoft/vscode-python

Description: Parts of this question was already answered several times, so be patient when reading. :) Our usual workspace structure is: rootDir/: - project.vscode-workspace - sources/: - main.py - someSrcFile.py - ... - common/: - commFileOne.py - ....

Open Graph Description: Parts of this question was already answered several times, so be patient when reading. :) Our usual workspace structure is: rootDir/: - project.vscode-workspace - sources/: - main.py - someSrcFile....

X Description: Parts of this question was already answered several times, so be patient when reading. :) Our usual workspace structure is: rootDir/: - project.vscode-workspace - sources/: - main.py - someSrcFile....

Opengraph URL: https://github.com/microsoft/vscode-python/issues/6544

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Improve configuration for search paths ","articleBody":"Parts of this question was already answered several times, so be patient when reading. :)\r\nOur usual workspace structure is:\r\n```\r\nrootDir/:\r\n    - project.vscode-workspace\r\n    - sources/:\r\n        - main.py\r\n        - someSrcFile.py\r\n        - ...\r\n        - common/:\r\n            - commFileOne.py\r\n            - ...\r\n```\r\nNothing unusual here. \r\nThan, we have another folder with common python modules in remote location - this location is added by modules (inserting to `sys.path`). I will call this location _remoteDir_.\r\n```\r\n\u003csome remote location>\r\nremoteDir/:\r\n    - remoteModule.py\r\n    - ...\r\n```\r\nWhen running _main.py_ from VS Code, we specify launch configuration with cwd changed to _rootDir/sources_. It runs OK, files from _common_ and _remoteDir_ are accessible (since `sys.path` is manually modified).\r\n\r\nTo implement autocomplete (either Intellisense Python Language Server or JEDI) and Pylint, this directories are not seen by default - _.vscode-workspace_ file is not in _sources_ folder. I am aware of PYTHONPATH variable in _.env_ file - I added _sources_ and _remoteDir_ to PYTHONPATH variable and VS Code autocomplete and pylint works as expected.\r\n\r\n**The problem** is that this PYTHONPATH variable affects the code and is bound to this IDE, which I don't like - one could easily develop code with VS Code (which has specified PYTHONPATH) and forget to handle `sys.path`, not knowing that the code now can't be executed without this IDE and it's _.env_ settings.  \r\nExample: A newbie come to our department, take prepared VS Code workspace and create a new module in _common_ folder, which must be executed also in standalone mode. In this module, he wants to use functions from _remoteDir_. Since PYTHONPATH is already set in _.env_, he doesn't know that he actually have to manually handle `sys.path` - autocomplete and pylint just works out of the box. Also, using VS Code, he can run _main.py_ or his new script without problems. But, if he (or someone else) run this script from a command line: `cd ./sources/common; python hisCommonFile.py`, this will fail. Why - because nothing specify PYTHONPATH variable, and he doesn't have `sys.path` handled properly. \r\n\r\n**The question is:** how to properly configure folder paths for autocomplete and pylint in VS Code, that wouldn't have any effect on how code is executed? I don't expect autocomplete and linter would interactively resolve modified `sys.path` - seems like there should be something similar to PYTHONPATH, but would be only applied to autocomplete/pylint VS Code tasks, not launch configurations.\r\n\r\nJust for a clarification: I know this might be a silly example. Our case is a little more complex than described above, but the problem is somewhat simillar - I miss `includeFolders=[]` in both autocomplete and pylint settings section, or better, some common settings. `autocomplete.extraPaths` only solve problems for autocomplete (if it is working, last time I was checking It didn't work properly), not pylint - again, duplicated settings.\r\n\r\n\r\n\r\n","author":{"url":"https://github.com/schperplata","@type":"Person","name":"schperplata"},"datePublished":"2019-07-11T07:52:57Z","url":"https://github.com/microsoft/vscode-python/issues/6544"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:24b39c29-b141-d497-3c66-121dfce442d1
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE78C:37D9F:599CB6:79AB9B:6AFE5F8D
html-safe-noncef420e9aee99bbed68c1aa497893fd3dd26b15d5f371b4c616b1f8e5c2560dbde
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNzhDOjM3RDlGOjU5OUNCNjo3OUFCOUI6NkFGRTVGOEQiLCJ2aXNpdG9yX2lkIjoiNzYzMDAzMzE3NTc4MzAzODg2MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac736a9ab9ba9edb017192d44b359eebd56328a4df9229ca9104a1857708fa1285
hovercard-subject-tagissue:466724461
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/vscode-python/6544/issue_layout
twitter:imagehttps://opengraph.githubassets.com/d0eed144355bff214c115490f94a7dd31718d635b3ed2404d1bee2845d4a1e05/microsoft/vscode-python/issues/6544
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/d0eed144355bff214c115490f94a7dd31718d635b3ed2404d1bee2845d4a1e05/microsoft/vscode-python/issues/6544
og:image:altParts of this question was already answered several times, so be patient when reading. :) Our usual workspace structure is: rootDir/: - project.vscode-workspace - sources/: - main.py - someSrcFile....
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameschperplata
hostnamegithub.com
expected-hostnamegithub.com
Noneb3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86
turbo-cache-controlno-preview
go-importgithub.com/microsoft/vscode-python git https://github.com/microsoft/vscode-python.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id106462765
octolytics-dimension-repository_nwomicrosoft/vscode-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forktrue
octolytics-dimension-repository_parent_id49946255
octolytics-dimension-repository_parent_nwoDonJayamanne/pythonVSCode
octolytics-dimension-repository_network_root_id49946255
octolytics-dimension-repository_network_root_nwoDonJayamanne/pythonVSCode
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release4a10310af51a1bfffbedc4fd81cb582acf0cb0ff
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/vscode-python/issues/6544#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fvscode-python%2Fissues%2F6544
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fvscode-python%2Fissues%2F6544
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=microsoft%2Fvscode-python
Reloadhttps://github.com/microsoft/vscode-python/issues/6544
Reloadhttps://github.com/microsoft/vscode-python/issues/6544
Reloadhttps://github.com/microsoft/vscode-python/issues/6544
microsofthttps://github.com/microsoft
vscode-pythonhttps://github.com/microsoft/vscode-python
Codehttps://github.com/microsoft/vscode-python
Issues344 (344)https://github.com/microsoft/vscode-python/issues
Pull requests54 (54)https://github.com/microsoft/vscode-python/pulls
Discussionshttps://github.com/microsoft/vscode-python/discussions
Actionshttps://github.com/microsoft/vscode-python/actions
Wikihttps://github.com/microsoft/vscode-python/wiki
Security and quality2 (2)https://github.com/microsoft/vscode-python/security
Insightshttps://github.com/microsoft/vscode-python/insights
https://github.com/microsoft/vscode-python
New issuehttps://github.com/login?return_to=https://github.com/microsoft/vscode-python/issues/6544
New issuehttps://github.com/login?return_to=https://github.com/microsoft/vscode-python/issues/6544
Improve configuration for search paths https://github.com/microsoft/vscode-python/issues/6544#top
area-editor-*User-facing catch-allhttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22area-editor-*%22
feature-requestRequest for new features or functionalityhttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22feature-request%22
https://github.com/schperplata
Domen Jurkovic (schperplata)https://github.com/schperplata
on Jul 11, 2019https://github.com/microsoft/vscode-python/issues/6544#issue-466724461
Domen Jurkovic (schperplata)https://github.com/schperplata
triage-neededNeeds assignment to the proper sub-teamhttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22triage-needed%22
on Jul 11, 2019https://github.com/microsoft/vscode-python/issues/6544#event-2474966716
Don Jayamanne (DonJayamanne)https://github.com/DonJayamanne
needs decisionhttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22needs%20decision%22
feature-requestRequest for new features or functionalityhttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22feature-request%22
on Jul 11, 2019https://github.com/microsoft/vscode-python/issues/6544#event-2476812391
triage-neededNeeds assignment to the proper sub-teamhttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22triage-needed%22
on Jul 11, 2019https://github.com/microsoft/vscode-python/issues/6544#event-2476812443
https://github.com/brettcannon
Brett Cannon (brettcannon)https://github.com/brettcannon
on Jul 31, 2019https://github.com/microsoft/vscode-python/issues/6544#issuecomment-517019020
Luciana Abud (luabud)https://github.com/luabud
needs proposalNeed to make some design decisionshttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22needs%20proposal%22
needs decisionhttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22needs%20decision%22
on Sep 17, 2019https://github.com/microsoft/vscode-python/issues/6544#event-2641261250
Luciana Abud (luabud)https://github.com/luabud
Tyreke White (Anapo14)https://github.com/Anapo14
Luciana Abud (luabud)https://github.com/luabud
on Sep 17, 2019https://github.com/microsoft/vscode-python/issues/6544#event-2641261577
Luciana Abud (luabud)https://github.com/luabud
feature-*https://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22feature-*%22
on Sep 19, 2019https://github.com/microsoft/vscode-python/issues/6544#event-2647594141
Luciana Abud (luabud)https://github.com/luabud
on Sep 19, 2019https://github.com/microsoft/vscode-python/issues/6544#event-2647594237
Luciana Abud (luabud)https://github.com/luabud
area-editor-*User-facing catch-allhttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22area-editor-*%22
feature-*https://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22feature-*%22
on May 13, 2020https://github.com/microsoft/vscode-python/issues/6544#event-3334119175
Luciana Abud (luabud)https://github.com/luabud
Tyreke White (Anapo14)https://github.com/Anapo14
on May 13, 2020https://github.com/microsoft/vscode-python/issues/6544#event-3334119189
Luciana Abud (luabud)https://github.com/luabud
on Jul 8, 2020https://github.com/microsoft/vscode-python/issues/6544#event-3527428928
Karthik Nadig (karthiknadig)https://github.com/karthiknadig
Luciana Abud (luabud)https://github.com/luabud
on Aug 4, 2020https://github.com/microsoft/vscode-python/issues/6544#event-3621388666
Luciana Abud (luabud)https://github.com/luabud
on May 12, 2022https://github.com/microsoft/vscode-python/issues/6544#event-6600664281
https://github.com/luabud
Luciana Abud (luabud)https://github.com/luabud
on Dec 14, 2023https://github.com/microsoft/vscode-python/issues/6544#issuecomment-1854875825
Karthik Nadig (@karthiknadig)https://github.com/karthiknadig
Pylance extensionhttps://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance
Pylint extensionhttps://marketplace.visualstudio.com/items?itemName=ms-python.pylint
https://github.com/karthiknadig
Karthik Nadig (karthiknadig)https://github.com/karthiknadig
on Dec 14, 2023https://github.com/microsoft/vscode-python/issues/6544#issuecomment-1855002558
https://github.com/luabud
Luciana Abud (luabud)https://github.com/luabud
on Dec 14, 2023https://github.com/microsoft/vscode-python/issues/6544#issuecomment-1855010935
Luciana Abud (luabud)https://github.com/luabud
completedhttps://github.com/microsoft/vscode-python/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Dec 14, 2023https://github.com/microsoft/vscode-python/issues/6544#event-11242597624
github-actionshttps://github.com/apps/github-actions
needs proposalNeed to make some design decisionshttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22needs%20proposal%22
on Dec 14, 2023https://github.com/microsoft/vscode-python/issues/6544#event-11242598488
github-actionshttps://github.com/apps/github-actions
on Jan 14, 2024https://github.com/microsoft/vscode-python/issues/6544#event-11479348471
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/vscode-python/issues/6544
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/vscode-python/issues/6544
area-editor-*User-facing catch-allhttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22area-editor-*%22
feature-requestRequest for new features or functionalityhttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22feature-request%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.