sudo_password = 'mypass'
command = 'mount -t vboxsf myfolder /home/myuser/myfolder'.split()
p = Popen(['sudo', '-S'] + command, stdin=PIPE, stderr=PIPE,
    universal_newlines=True)
sudo_prompt = p.communicate(sudo_password + '\n')[1]
Использование sudo со скриптом Python