title: Python script to interact with fdisk prompts automatically
body: <p>This Python program enters fdisk.  I see the output.  fdisk is an interactive program.  How do I get the Python program to pass an "m" to the first field and press enter? </p>
  
  <pre><code>import subprocess
  a = "dev/sda"
  x = subprocess.call(["fdisk", a])
  print x
  </code></pre>
  
  <p>I'd rather not import a new module/library, but I could.  I've tried different syntax with subprocess.call() and extra parameters in the above.  Nothing seems to work.  I get different errors. I've reviewed Python documentation.  I want to feed input and press Enter in the subsequent, interactive menu options of fdisk.</p>