New submission from Raymond Hettinger <[email protected]>:
To facilitate rapid experimentation with SQL queries, add a shell to run
commands and display results.
Attached is minimal proof-of-concept modeled loosely on the Linux sqlite3 REPL.
Here's a sample session:
SQLite version 2.6.0
Enter "help" for usage hints
sqlite> open Irises.db
sqlite> select distinct species from irises
('Iris-setosa',)
('Iris-versicolor',)
('Iris-virginica',)
sqlite> select species, avg(pet_len), avg(sep_len) from irises group by
species
('Iris-setosa', 1.464, 5.005999999999999)
('Iris-versicolor', 4.26, 5.936)
('Iris-virginica', 5.552, 6.587999999999998)
sqlite> select count(*) from irises
(150,)
sqlite> quit
----------
components: Library (Lib)
files: sqlite3_repl.py
messages: 316248
nosy: rhettinger
priority: normal
severity: normal
status: open
title: Add an interactive shell for Sqlite3
type: enhancement
versions: Python 3.8
Added file: https://bugs.python.org/file47573/sqlite3_repl.py
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue33436>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com