Run your python script from the cmd with its name

If you want to run a python script just writing its name from the command line, without having to write py script_name.py, you can:

py script_name.py

This worked for me:

Open the cmd, write the name of the .bat file and it will work

write var in the search bar and the enviromental variable settings will show up
then click on enviromental variable
Now you can use the name of the batch file to start it frm everywhere
here is the batch file in the myapp_launcher folder

In the pymemo.bat you can write

python book20.py

so that you can launch that script from everywhere just typing pymemo in the command line (you can obviously change the names of the files to more intuitive ones).


Subscribe to the newsletter for updates
Tkinter templates
My youtube channel

Twitter: @pythonprogrammi - python_pygame

Videos

Speech recognition game

Pygame's Platform Game

Other Pygame's posts