Могут ли два процесса одновременно обращаться к базе данных в памяти (: memory :) sqlite?
Можно ли получить доступ к базе данных в одном процессе, созданном в другом? Я пытался:
IDLE # 1
import sqlite3
conn = sqlite3.connect(':memory:')
c = conn.cursor()
c.execute("create table test(testcolumn)")
c.execute("insert into test values('helloooo')")
conn.commit()
conn.close()
IDLE # 2
import sqlite3
conn = sqlite3.connect(':memory:')
c = conn.cursor()
c.execute("select * from test")
Ошибка:
Traceback (most recent call last):
File "<pyshell#5>", line 1, in <module>
q = c.execute("select * from test")
sqlite3.OperationalError: no such table: test