title: python - how to check if table exists?
body: <p>I'm using this function :</p>
  
  <pre><code>def checker(name,s)
          MY_T = "SELECT count(*) FROM `"+session.SessionInfo.Name where EventName='"+name+"'"
  </code></pre>
  
  <p>I want to check if the table exists, how can I do it ?
  I saw some examples using : <code>XXXX.execute()</code> what does it mean?</p>
  
  <p>Here is what I saw :</p>
  
  <pre><code>query = cursor.execute("""SELECT count(*) FROM scan WHERE prefix = %s and code_id = %s and answer = %s and station_id = %s""",
                            (prefix, code_id, answer, station,))
          if query != 1:
  </code></pre>
  
  <p>I tried printing MY_T to see if it returns -1 for example but it just prints <code>"select count (*)...... "</code> </p>
  
  <p>How can I check it?
  Any help would be very appreciated.</p>