How do i run a python program just by typing the script name on windows 10 cmd line? Also without having to change directory. I already added my scripts folder and python folder to the path. tried also tu run assoc py.=PythonScript ftype PythonScript=python.exe %1 %*
Here's the program's content:
#! python3
# mapIt.py - Launches a map in the browser using an address from the command line or clipboard
import webbrowser, sys, pyperclip
if len(sys.argv) > 1:
address = ' '.join(sys.argv[1:])
else:
address = pyperclip.paste()
webbrowser.open('https://www.google.com/maps/place/' + address)

python mapIt.pyseems to have worked. It looks like though that the script just doesn't do anything. Also, please post everything as text instead of images.mapIt.py?python .\scripts\mapIt.py(this one only works when you are running it from theC:\Users\Tommasodirectory) orpython C:\Users\Tommaso\scripts\mapIt.py(this command will work at directory)