title: python: check if a hostname is resolved
body: <p>How can I have a function in python that returns 1 if the a hostname resolves and 0 if a hostname does not.</p>
  
  <p>I couldn't find anything useful, any thoughts?</p>
  
  <p>Thanks,</p>