Created
January 10, 2022 21:27
-
-
Save maciakl/cf7b3c5d237c856cef61472a9358526e to your computer and use it in GitHub Desktop.
This fixes the issue on Windows where running Python script directly by invoking its name (eg. script.py) on the command line, launches a new console window, instead of showitg the output in the same console.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rem Run CMD.EXE as Admin, then | |
| assoc .py=Python.File | |
| rem Assuming you installed Python via the Microsoft use below | |
| rem If yuou installed Python via an installer, substitute the absolute path to the python executable | |
| ftype Python.File=%LOCALAPPDATA%\Microsoft\WindowsApps\python.exe "%1" %* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment