Use PyLance with VSCodium

PyLance is a very good language server for Visual Studio Code developed by Microsoft. Because of that MS has restricted the usage of PyLance to their own marketstore and distribution of VSCodium, titled Visual Studio Code. What MS does is it takes the open-source base (MIT) and republishes it under a different license. Their version contains telemetry and maybe other “MS features”.

Here is how you can make PyLance accessible under VSCodium, but there is a catch: these changes has to be made after every update of either PyLance or VSCodium.

Please note that all paths here are for the macOS version, the paths may change on other operating systems.

So let’s first change the file /Applications/VSCodium.app/Contents/Resources/app/product.js from VSCodium. You need change the values of the keys below:

{
“nameShort”: “Visual Studio Code”,
“nameLong”: “Visual Studio Code”,
“extensionsGallery”: {
“serviceUrl”: “https://marketplace.visualstudio.com/_apis/public/gallery”,
“cacheUrl”: “https://vscode.blob.core.windows.net/gallery/index”,
“itemUrl”: “https://marketplace.visualstudio.com/items”
}
}

As a second step you have to delete the extension.bundle.js file in the PyLance plugin folder, in my case the folder was:

/Users/myuser/.vscode-oss/extensions/ms-python.vscode-pylance-2023.10.12/dist/extension.bundle.js

Please note that every pylance update changes the path. here is was for version 2023.10.12

Now PyLance should start. Unfortunately PyLance is such an amazing language server and better than Jedi, so at least for me, it is worth the effort after every update.

MS is not an open-source company!

Install Let’s Encrypt certificate on Microsoft Exchange

Download the ACME client for windows here:

https://www.win-acme.com

then unzip it into a directory, e.g. C:\win-acme and change into that directory. then paste the following command (but make sure to change the needed parameters before executing):

.\wacs.exe --source manual --host "mail.example.com,autodiscover.example.com" --certificatestore My --acl-fullcontrol "network service,administrators" --installation "iis,script" --installationsiteid 1 --script "./Scripts/ImportExchange.v2.ps1" --scriptparameters "'{CertThumbprint}' 'IIS,SMTP,IMAP,POP' 1 '{CacheFile}' '{CachePassword}' '{CertFriendlyName}'"

In this example we want a certificate for mail.example.com and autodiscover.example.com for the services IIS, SMTP, IMAP and POP. Important note for Hybrid Exchange configurations (synced to Office 365): you should use 0 instead of 1 in the --scriptparameters, which translates to the LeaveOldExchangeCerts input of the sample script.

More infos about this: https://www.win-acme.com/manual/advanced-use/examples/exchange