Send the value from a slider to a script .py

Do you want to do this in a rule or with the exec binding?

I would approach it in a rule. (a quick search of the forum is never pointless when starting out)

Something like this

rule "item value to command line"
when
Item WhateverYouLike changed  // Item name for your Slider in this case
then
execCommand("AbsolutePathToYourScript and switches " + WhateverYouLike.state) // this will run your script, add whatever switches your script needs and append the State of the Item. You could structure complex command lines this way
end