title: Python - RFID read in a loop
body: <p>I am trying to make a python code that will read my the <code>RFID</code> card , and if he will not get any respone contine. </p>
  
  <p>but I got stuck when he wait for a replay form the reader 
  is there any <strong>python</strong> command that say something like: </p>
  
  <pre><code>while reader.available()? 
  </code></pre>
  
  <p>this is the code I have (which is waiting for putting the RF tag)</p>
  
  <pre><code>#!/usr/bin/env python
  
  import RPi.GPIO as GPIO
  import SimpleMFRC522
  import time
  
  reader = SimpleMFRC522.SimpleMFRC522 ()
  OldText = ''
  
  while True:
     # GPIO.cleanup()
      time.sleep(1)
      try:
          status,TagType = reader.read_no_block()
          print(status)
          if status == 'None':
              print ("No Card Found")
          elif status != 'None':
              id,text = reader.read()
              if text != OldText:
                  print(text)
                  OldText=text
  
              else:
                  print ("Same card")
  
      finally:
          GPIO.cleanup()
      time.sleep(5) 
  </code></pre>
  
  <p>this is the Fix code - 
  but on the shell I don't get the "No card found" - why?
  this is the output I'm getting now :</p>
  
  <pre><code>675036844849
  new test 13.9.18                                
  None
  Same card
  MFRC522-python/ReadOnce.py:28: RuntimeWarning: No channels have been set up yet - nothing to clean up!  Try cleaning up at the end of your program instead!
    GPIO.cleanup()
  None
  Same card
  None
  Same card
  None
  Same card
  None
  White_Card                                      
  None
  Same card
  None
  Same card
  None
  </code></pre>
  
  <p>if no card is on the RFID - it get stuck....
  why?</p>