title: How to get Fabric to automatically (instead of user-interactively) interact with shell commands? Combine with pexpect?
body: <p>Seeking means to get <a href="http://fabfile.org" rel="nofollow noreferrer">Fabric</a> to automatically (instead of user-interactively) interact with shell commands (and not just requests for passwords, but also requested user input when no "stdin/interactive override" like <code>apt-get install -y</code> is available).</p>
  
  <p><a href="https://stackoverflow.com/questions/5182857/can-i-use-fabric-to-perform-interactive-shell-commands">This question</a> along with these <a href="http://docs.fabfile.org/en/1.3.3/usage/interactivity.html?highlight=interactive" rel="nofollow noreferrer">Fabric docs</a> suggest that Fabric can only "push the interactivity" back to the human user that's running the Fabric program.  Seeking to instead fully automate without any human presence.  Don't yet have a "real," current problem to solve, just preparing for possible, future obstacle.</p>
  
  <p>Possibly useful to combine with <a href="http://www.noah.org/python/pexpect/" rel="nofollow noreferrer">pexpect</a> (or similar, alternative mechanism) if Fabric can't exclusively handle all stdin/prompts automatically?  Hoping it doesn't need to be an <a href="https://stackoverflow.com/questions/4200267/fabric-vs-pexpect">"either/or" kind of thing</a>.  Why not leverage both (pexpect and Fabric) where appropriate, if applicable, in same program/automation?</p>