title: How to check if a SQLite3 database exists in Python?
body: <p>I am trying to create a function in Python 2.7.3 to open a SQLite database.<br> </p>
  
  <p>This is my code at the moment:</p>
  
  <pre><code>import sqlite3 as lite
  import sys
  
  db = r'someDb.sqlite'
  
  def opendb(db):
      try:
          conn = lite.connect(db)
      except sqlite3.Error:
          print "Error open db.\n"
          return False
      cur = conn.cursor()
      return [conn, cur]
  </code></pre>
  
  <p>I have tried the code above and I have observed that the <code>sqlite3</code> library opens the database declared if exists, or creates a new database if this one doesn't exist. </p>
  
  <p>Is there a way to check if the database exists with <code>sqlite3</code> methods or I have to use file operation like <code>os.path.isfile(path)</code>?</p>