How do you run a Python script from within Notepad++ but using powershell and in the directory of the script? -
how run python script within notepad++ opens in windows powershell , runs script directory python script located if there space in directory path.
to able run python script in powershell can press f5 open run dialog box, run python script in powershell can use;
powershell.exe -noexit -command "cd "$(current_directory)"; python -i "$(full_current_path)""
this opens powershell in ugly format similar cmd looks default have features, not run script directory relative paths don't work. make powershell normal should run shortcut in start menu, allow work if file path has space in should put \ before quotation marks. working run command therefore;
"c:\programdata\microsoft\windows\start menu\programs\accessories\windows powershell\windows powershell.lnk" -noexit -command cd \"$(current_directory)\"; python -i \"$(full_current_path)\"
Comments
Post a Comment