title: How to capture the value on EOFError with raw_input in Python 2.7?
body: <p><strong>raw data:</strong></p>
  
  <pre><code>k = {u'description': u'First Contentful Paint marks the time at which the first text or image is painted. [Learn more].', u'title': u'First Contentful Paint', u'score': 1.0, u'scoreDisplayMode': u'numeric', u'displayValue': u'0.5\xa0s', u'id': u'first-contentful-paint'}
  </code></pre>
  
  <p><strong>snippet:</strong></p>
  
  <pre><code>data = k["lighthouseResult"]["audits"]["first-contentful-paint"]["displayValue"]
  
  try:
      val = raw_input(data.encode("utf-8"))
  except EOFError:
      print("skipped")
  
  print "output: " + val
  </code></pre>
  
  <p>In the above snippet, how can I store the results in <code>val</code>; the step is skipped when there is a <code>EOFError</code> on line <code>val = raw_input(data.encode("utf-8"))</code></p>
  
  <p>Here is the actual output I get, and I am unable to store the values <code>x.x s</code> in a variable</p>
  
  <pre><code>0.5 sskipped
  
  output: 
  </code></pre>
  
  <p><strong>Expected:</strong></p>
  
  <pre><code>output: 0.5s
  </code></pre>
  
  <p>Python version: <code>2.7</code></p>