how to capture folder as input and pass it to python script as argument

How to capture folder as input and pass it to python script as argument?

This is what I have so far, but this is always taking the user home directory as input no matter which folder i right click > Services > testing_service (which you see below)

Automator: to run python script on folder right click


You need to tell it where to put the arguments.

for f in "$@"
do
    "/usr/local/bin/python" -i -o "~/Development/python/slideShow/scripts/slideshow" "$f"
done

…or, if you're only ever going to select one folder, you can simplify it a bit:

"/usr/local/bin/python" -i -o "~/Development/python/slideShow/scripts/slideshow" "$@"