title: Python -- How to make an event loop in the console
body: <p>Using Python 2.7, how would I make an event loop that I can run my program inside? My idea is that the script will run, and the event loop will detect the press of a certain key (<kbd>q</kbd> in this case), that will do the same thing as <code>Keyboard Interupt</code>, just slightly prettier.</p>
  
  <p>I've seen <a href="https://stackoverflow.com/questions/13064373/basic-event-loop-in-python">this question</a>, but wasn't sure how to apply it.</p>
  
  <p>Also, like the OP of the linked question, I'd like to do this without any external modules/packages (if possible).</p>
  
  <p>I can post my program code if you need it, but I don't think it's relevant in this case.</p>