id: "python" aliases: - "python3" - "python2" - "py" name: "Python" monacoLang: python info: impl: "CPython" version: "Python 3" year: 1990 desc: "Interpreted, high-level, general-purpose programming language" ext: - py - pyi - pyc - pyd - pyo - pyw - pyz web: wiki: "https://en.wikipedia.org/wiki/Python_(programming_language)" home: "https://www.python.org/" source: "https://github.com/python/cpython" category: general mode: interpreted platform: python syntax: - python - whitespace typing: dynamic paradigm: - functional - imperative - oo usage: popular install: apt: - python3 - python3-pip - black manual: | install -d "${pkg}/opt/mspyls" install -d "${pkg}/usr/local/bin" wget "$(curl -fsSL "https://pvsc.blob.core.windows.net/python-language-server-stable?restype=container&comp=list&prefix=Python-Language-Server-linux-x64" | grep -Eo 'https://[^<]+\.nupkg' | tail -n1)" unzip -d "${pkg}/opt/mspyls" Python-Language-Server-linux-x64.*.nupkg chmod +x "${pkg}/opt/mspyls/Microsoft.Python.LanguageServer" ln -s "/opt/mspyls/Microsoft.Python.LanguageServer" "${pkg}/usr/local/bin/Microsoft.Python.LanguageServer" repl: | python3 -u main: "main.py" template: | print("Hello, world!") run: | python3 -u -i main.py scope: code: | x = 123 * 234 format: run: | black - input: | print('Hello, world!') pkg: install: | pip3 install --user NAME uninstall: | pip3 uninstall NAME search: | python3 -c 'import json; from xmlrpc import client; print(json.dumps(client.ServerProxy("https://pypi.org/pypi").search({"name": "NAME"})))' | jq -r 'map(.name) | .[]' lsp: start: | Microsoft.Python.LanguageServer init: interpreter: properties: InterpreterPath: /usr/bin/python3 code: "import func" item: "functools"