From 42584a00972a8c5b1354f2c4d38f764330b27793 Mon Sep 17 00:00:00 2001 From: stonebig Date: Sun, 6 Jul 2025 15:14:07 +0200 Subject: [PATCH] move laucnher scripts to python -m module avoiding the module.exe script when we can --- portable/launchers_final/scripts/winidle.bat | 3 ++- portable/launchers_final/scripts/winipython_notebook.bat | 3 ++- portable/launchers_final/scripts/winjupyter_lab.bat | 3 ++- portable/launchers_final/scripts/winpython.bat | 4 ++-- portable/launchers_final/scripts/wpcp.bat | 3 ++- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/portable/launchers_final/scripts/winidle.bat b/portable/launchers_final/scripts/winidle.bat index 79a6a01a..797549ab 100644 --- a/portable/launchers_final/scripts/winidle.bat +++ b/portable/launchers_final/scripts/winidle.bat @@ -1,3 +1,4 @@ @echo off call "%~dp0env_for_icons.bat" %* -"%WINPYDIR%\python.exe" "%WINPYDIR%\Lib\idlelib\idle.pyw" %* \ No newline at end of file +rem "%WINPYDIR%\python.exe" "%WINPYDIR%\Lib\idlelib\idle.pyw" %* +"%WINPYDIR%\python.exe" -m idlelib %* \ No newline at end of file diff --git a/portable/launchers_final/scripts/winipython_notebook.bat b/portable/launchers_final/scripts/winipython_notebook.bat index 7ee541d9..f5681520 100644 --- a/portable/launchers_final/scripts/winipython_notebook.bat +++ b/portable/launchers_final/scripts/winipython_notebook.bat @@ -1,3 +1,4 @@ @echo off call "%~dp0env_for_icons.bat" %* -"%WINPYDIR%\scripts\jupyter-notebook.exe" %* \ No newline at end of file +rem "%WINPYDIR%\scripts\jupyter-notebook.exe" %* +"%WINPYDIR%\python.exe" -m jupyter notebook %* \ No newline at end of file diff --git a/portable/launchers_final/scripts/winjupyter_lab.bat b/portable/launchers_final/scripts/winjupyter_lab.bat index 845d1f0b..ffdf2fce 100644 --- a/portable/launchers_final/scripts/winjupyter_lab.bat +++ b/portable/launchers_final/scripts/winjupyter_lab.bat @@ -1,3 +1,4 @@ @echo off call "%~dp0env_for_icons.bat" %* -"%WINPYDIR%\scripts\jupyter-lab.exe" %* \ No newline at end of file +rem "%WINPYDIR%\scripts\jupyter-lab.exe" %* +"%WINPYDIR%\python.exe" -m jupyter lab %* \ No newline at end of file diff --git a/portable/launchers_final/scripts/winpython.bat b/portable/launchers_final/scripts/winpython.bat index 9f98d397..2a0706ec 100644 --- a/portable/launchers_final/scripts/winpython.bat +++ b/portable/launchers_final/scripts/winpython.bat @@ -1,8 +1,8 @@ @echo off call "%~dp0env_for_icons.bat" %* rem backward compatibility for non-ptpython users -if exist "%WINPYDIR%\scripts\ptpython.exe" ( - "%WINPYDIR%\scripts\ptpython.exe" %* +if exist "%WINPYDIR%\Lib\site-packages\ptpython" ( + "%WINPYDIR%\python.exe" -m ptpython %* ) else ( "%WINPYDIR%\python.exe" %* ) \ No newline at end of file diff --git a/portable/launchers_final/scripts/wpcp.bat b/portable/launchers_final/scripts/wpcp.bat index 5edb982c..a2bd53bb 100644 --- a/portable/launchers_final/scripts/wpcp.bat +++ b/portable/launchers_final/scripts/wpcp.bat @@ -1,3 +1,4 @@ @echo off call "%~dp0env_for_icons.bat" %* -cmd.exe /k "echo wppm & wppm %*" \ No newline at end of file +rem cmd.exe /k "echo wppm & wppm" %* +cmd.exe /k "echo wppm & python -m wppm" %* \ No newline at end of file