7 ms·
Interesting! You can also inherit from code.InteractiveConsole[0] to build a REPL. That's how the new sqlite3 REPL is implemented[1] [0]: https://docs.python.o
by polyrand 4y ago
Interesting! You can also inherit from code.InteractiveConsole[0] to build a REPL. That's how the new sqlite3 REPL is implemented[1]
[0]: https://docs.python.org/3/library/code.html#code.InteractiveConsole https://docs.python.org/3/library/code.html#code.Interactive...
[1]: https://github.com/python/cpython/blob/02d9f1504beebd98dea807f4b8761d3675a500d0/Lib/sqlite3/__main__.py#L37 https://github.com/python/cpython/blob/02d9f1504beebd98dea80...
- Aperocky 4y agoOOO, I did not actually know this. Though I was more intending for each command/group of commands to get its own file/implementation, so it's less like a SQL engine and more like a client.