title: Python to PHP strange error
body: <p>I hope somebody can help me. :)</p>
  
  <p>I am calling a python script from PHP, with the help from phpseclib/ssh2 i ssh into my server and it works fine.</p>
  
  <p>My problem is that if i use "time.sleep(5)" in the loop of my python script i dont get a result back, but if i remove time.sleep(5) and time.sleep(3) it works.</p>
  
  <p>Anybody have an idea why this happen?</p>
  
  <p>If i try the python script i my console everything is picture perfect.!</p>
  
  <pre><code>items = [
      '1',
      '2',
      '3'
  ]
      itemArray = {}
      def checker():
          for item in items:
              time.sleep(5) # If added not working, if removed working, result gets send back
              position = 1  # keeps track of the ranking position
              for start in range(int(deep)):
                  time.sleep(3)
                  results = 'something'
                  for div in results:
                      try:
                          if div.find('i', href=True)['href'].find(something) != -1:
                              exit_conditon = True
                              break
                          else:
                              position += 1
                      except:
                          print "Unexpected error:", sys.exc_info()[0]
                          raise
                  if 'exit_conditon' in locals():
                      if exit_conditon is True:
                          exit_conditon = False
                          itemArray.update({value: 1})
                          break
  
          sys.exit(itemArray)
      checker() 
  </code></pre>
  
  <p>Please help. </p>
  
  <p>Update: if i have 3 rows in the items array i need to remove the second time.sleep(5) to get it working, if i have 2 items in my array i only need to remove the first time.sleep(5).</p>