Is there a way to switch the "python [filename].py to a shortcut
Question:
Is there a way to switch the "python [filename].py to a shortcut like "shutdown" for example?
Answers:
If you’re on Linux, then go to the end of your bash configuration file (found at ~/.bashrc
), and add the line:
alias shutdown="python filename.py"
If you’re on Windows, then create a file with the following line:
python filename.py
Then save the file as shutdown.bat
and put it in your Windows directory (at C:WINDOWS
, also abbreviated as %windir%
).
Is there a way to switch the "python [filename].py to a shortcut like "shutdown" for example?
If you’re on Linux, then go to the end of your bash configuration file (found at ~/.bashrc
), and add the line:
alias shutdown="python filename.py"
If you’re on Windows, then create a file with the following line:
python filename.py
Then save the file as shutdown.bat
and put it in your Windows directory (at C:WINDOWS
, also abbreviated as %windir%
).