title: How to get and print Jenkins console output in Python script
body: <p>I am trying to trigger a jenkins job using python script with <a href="http://pythonhosted.org/jenkinsapi/" rel="nofollow noreferrer"><code>jenkinsapi</code></a> module. </p>
  
  <pre><code>import jenkinsapi
  from jenkinsapi.jenkins import Jenkins
  J = Jenkins('http://localhost:8080')
  J.build_job('testjob')
  </code></pre>
  
  <p>I want to print console output from jenkins job which gets triggered with this in my python script. Can someone suggest me how can I achieve this?</p>