En Sun, 28 Jun 2009 10:45:49 -0300, Nuff Nuff <nuffno...@gmail.com> escribió:

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 HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell
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 script.py" %1 %*

See http://msdn.microsoft.com/en-us/library/dd807139(VS.85).aspx for more details

--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to