GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — vscode-python/pythonFiles/ptvsd_folder_name.py at master · AchillesLe/vscode-python

Expand file tree

/

ptvsd_folder_name.py

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
37 lines (26 loc) · 1.01 KB
/

ptvsd_folder_name.py

Copy path

File metadata and controls

37 lines (26 loc) · 1.01 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import sys
import os.path
ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
PYTHONFILES = os.path.join(ROOT, "pythonFiles", "lib", "python")
sys.path.insert(0, PYTHONFILES)
from packaging.tags import sys_tags
sys.path.remove(PYTHONFILES)
def ptvsd_folder_name():
"""Return the folder name for the bundled PTVSD wheel compatible with the new debug adapter."""
try:
for tag in sys_tags():
folder_name = f"ptvsd-{tag.interpreter}-{tag.abi}-{tag.platform}"
folder_path = os.path.join(PYTHONFILES, folder_name)
if os.path.exists(folder_path):
print(folder_path, end="")
return
except:
# Fallback to use base PTVSD path no matter the exception.
print(PYTHONFILES, end="")
return
# Default fallback to use base PTVSD path.
print(PYTHONFILES, end="")
if __name__ == "__main__":
ptvsd_folder_name()
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.