Seeking means to get Fabric to automatically (instead of user-interactively) interact with shell commands (and not just requests for passwords, but also requested user input
For Windows users, use winpexpect. Make sure to use this version I linked as this version fixes some bugs in previous versions.
import sys, winpexpect
child = winpexpect.winspawn('ftp', [''])
child.logfile = sys.stdout
child.expect('User.*:')
child.sendline('username')
child.expect('Password:')
child.direct_sendline('password')
child .sendline('ls')
print('Now enter the FTP interactive mode')
child.interact()