vors / jupyter-powershell

PowerShell language kernel for Jupyter
MIT License
132 stars 26 forks source link

Please consider adding support for pwsh on Windows #24

Closed wsmelton closed 4 years ago

wsmelton commented 4 years ago

https://github.com/vors/jupyter-powershell/blob/e418eb055b4d89ef88249e1b6a1bd7e0835e19d0/powershell_kernel/util.py#L3-L5

PowerShell (pwsh) can run on Linux or Windows. Based on the util.py it seems we are prevented from using PowerShell 6+ on Windows. Can this be updated?

Could potentially do this instead for the util.py:

def get_powershell()
    ispwsh = os.path.exists("C:\\Program Files\\PowerShell\\6\\pwsh.exe")
    return 'powershell' if os.name == 'nt' and not ispwsh else 'pwsh'
vors commented 4 years ago

If you read the https://github.com/vors/jupyter-powershell#install-kernel it shows the command to use pwsh on windows.

python -m powershell_kernel.install --powershell-command pwsh