Running a script from a windows right click menu..?

Gabriel Genellina gagsl-py2 at
Sun Jun 28 20:35:45 CEST 2009

En Sun, 28 Jun 2009 10:45:49 -0300, Nuff Nuff <nuffnough at>  

> I wrote a little script that affects a bunch of files in the folder
> that it is run in.
> Now what I want to do is to make it run from the right click menu but
> I don't know how.
> Would you give me an example script that will simply print the
> woriking directory,  and show me how to add that to the right click
> menu in windows explorer?

In the Windows registry, add a new key under  
Make its default value the item text you want in the context menu.
Add a new key under it, "command", and make its default value the command  
line you want to execute. Will look like this:
"path to python.exe" "path to your" %1 %*

See for more  

Gabriel Genellina

More information about the Python-list mailing list