[Submitted to superuser two days ago, but nobody could answer it, so reposting here.]
Working on the basis of this post (and this follow-up post), I've tried adding a python script (which I've added to the path and so on, so that I can run it from the command line everywhere in the system) to the context menu, like this:
Windows Registry Editor Version 5.00
Python scripts aren't natively executable by Windows; it's complaining that you didn't specify an
.exe file. That's easy though, you just specify
python.exe. Follow that up with the path to your script and then a
%1 -- this is a placeholder for the path to the clicked file. To allow your command to work with paths with spaces in them, surround the
%1 with quote marks. Putting it all together, we get:
C:\path\to\python.exe C:\path\to\your\script.py "%1"
BTW, a handy utility for managing context menus is Fast Explorer.