title: I wolud like to copy sqlite3 db from memory to hard drive. How can I do?
body: <p>I wolud like to copy sqlite db from memory to hard drive. How can I do?</p>
  
  <p>I try this way:</p>
  
  <pre><code>conn_phy = sqlite3.connect("phy.db")
  conn = sqlite3.connect(":memory:")
  c = conn.cursor()
  c_phy = conn.cursor()
  
  for row in c.execute("select * from table"):
      c_phy.execute(' insert into tablephy (column1, column2, column3) values\
       (?,?,?)', row) #phy db column number equal memory column number
      conn_phy.commit()
  </code></pre>