In Perl, if I have execute a script and pass a password to it programatically, I would do this:
my $result = qx { "Calling some script which prompts for a user and password" <<EOF
administrator
password
EOF
};
It executes the following while capturing its output:
/bin/sh -c ' "Calling some script which prompts for a user and password" <<EOF
administrator
password
EOF
'
May I know the equivalent of this in Python?