I am rewriting a python script at work and part of what it does is searched inside a folder that I right-click on for image sequences.. The python side of things I think I'm good on, but the right click not so much. I can create a right click button in the regedit but I am unsure of how to pass an argument from where I right-clicked on the folder to my python script. I want the argument to have the path to the folder. I found a post about this but it is not working for me.. maybe because they were making it on xp?? I'm unsure.(Link below)
Copy as path in windows context menu
I also found this snip-it of code which is what I think was being used before as the richt-click command..
@="\"C:\Python26\python.exe\" \"L:\HAL\Func\search\search.py\" %L"
Can anyone explain this to me? I understand it first is going to run python then run the script.. but what is the @= and the %L for? I really want to understand this and I spent all day yesterday trying to figure it out but I'm just not finding much. Thanks in advance for your help :)
This is the python script I want to pass the argument too
import sys
import os
def __main__(argv = sys.argv):
fileName = argv[1]
print argv
print fileName