title: Get data from textarea in HTML using Python
body: <p>I am trying to print out to Python what the user types inside the <code>textarea</code> element in the HTML page. </p>
  
  <p><a href="https://i.stack.imgur.com/9LsrC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9LsrC.png" alt="example"></a></p>
  
  <p>If I type "hello world" into the textarea field and click the button 'Add comment', I would like to see it print out to the Python console. Can anyone help me with this?</p>
  
  <pre><code>a = ""
  
  a += '&lt;html&gt; \r\n'
  a += '&lt;head&gt; \r\n'
  a += '&lt;/head&gt; \r\n'
  a += '&lt;body&gt; \r\n'
  a += '&lt;form method="post"&gt; \r\n'
  a +=  '&lt;textarea name="comment101" style="width:300px; height: 70px; maxlength="300"; display:none;"&gt; \r\n'
  a +=  '&lt;/textarea&gt;&lt;/br&gt; \r\n'
  a +=  '&lt;input type="submit" name="comment101" value="Add comment" /&gt; \r\n'
  a +=  '&lt;/form&gt; \r\n'
  a += '&lt;/body&gt; \r\n'
  a += '&lt;/html&gt; \r\n'
  
  b = open("test.html", "wb")
  b.write(a)
  b.close()
  </code></pre>