title: Build job in Jenkins through python script
body: <p>I want to Trigger an Build Job in Jenkins through python-jenkins package.I used the Below code for test_api job but it is not working.How can i Build through Script..</p>
  
  <pre><code>import jenkins
  j = jenkins.Jenkins('http://your_url_here', 'username', 'password')
  print j.get_jobs()
  url=j.build_job_url('test_api', parameters=None, token=None)
  print url
  last_build_number = j.get_job_info('test_api')['lastCompletedBuild'] ['number']
  print "last_build_number",last_build_number
  build_info=j.get_build_info('test_api',last_build_number)
  if build_info['result']=='SUCCESS':
      print " Build Success "
  else:
      print " Build Failed "
      log=j.get_build_console_output('test_api',last_build_number)
      f=open('log_buildFail.txt','w')
      f.write(log)
      f.close()
  </code></pre>
  
  <p>It returns the Build url path after the build.</p>