My sqlite3 database contains a \"collate\" column-constraint. I\'ve placed it in the schema for the table, to prevent accidentally neglecting to use the necessary collation. How
subprocess.run() is preferred oversubprocess.call(). Below is my answer:
subprocess.run()
subprocess.call()
import subprocess schema = subprocess.run( ['sqlite3', 'xxx.db', '.schema' ], capture_output=True ).output.decode('utf-8') print(schema)