0
I create this database in python3 but it appears in a previous folder
import sqlite3
nome_banco = 'banco_escola.db'
banco = sqlite3.connect(nome_banco)
0
I create this database in python3 but it appears in a previous folder
import sqlite3
nome_banco = 'banco_escola.db'
banco = sqlite3.connect(nome_banco)
1
If you want to create a file in a specific directory, just pass an absolute path for the file to be created.
Follow an example:
import sqlite3
nome_banco = '/Users/nomeusuario/database.db'
banco = sqlite3.connect(nome_banco)
This way the file with name database.db
will be created in the absolute path desired, in this case will be created in: /Users/nomeusuario/
Browser other questions tagged python-3.x sqlite3
You are not signed in. Login or sign up in order to post.