title: os.system python function in a while loop
body: <p>I am trying to make a simple python script to automatically click in ubuntu 14.04.</p>
  
  <p>here is my code</p>
  
  <pre><code>#!/usr/bin/python
  import os
  clickCounter = 0
  while clickCounter == 0:
      timeNow = os.system('date +\"%s\"')
      if timeNow &gt; 10:
          os.system('xdotool click 1')
          clickCounter = clickCounter + 1
  </code></pre>
  
  <p>however, for some reason, all it will do is print out the time again and again until i close the terminal. if anyone can help me it would be very appreciated </p>