I have a batch file which is data.sh
. so I am running this using python
and data.sh code is something like this
configure()
{
read -p '--> Enter key ID: ' key_id
read -p '--> Enter secret key: ' secret_key
echo "$key_id"
echo "$secret_key"
}
I am running this something like this
import subprocess
rc = subprocess.call("data.sh")
I want to pass these both pass key_id and secret_key using python code. how I can achieve this ?