-
A responsive pair of reusable GUI components made with Tkinter, the Python binding to the Tk GUI toolkit
-
Allows visual dataset interrogation
-
Demonstrated with SQLite3
Environment Setup
- Python 3
- SQLite3
- Tkinter
ScrollBox
inherits from Tkinter'sListBox
to conveniently combine aListBox
and aScrollBar
together into a single component.
DataListBox
inherits fromScrollBox
to make it capable of loading its own data and, optionally, linking to anotherDataListBox
or TkinterLabel
.
From the root directory, Ubuntu, Linux and Mac users:
python3 project/db_connection.py
From the root directory, Windows users:
python --version # ensure at least 3.x.x
python project/db_connection.py
-
SQLite is not client-server. The database server is not running on a remote machine that you connect to; instead everything is running on the same machine.
_id INTEGER PRIMARY KEY
: some Java classes that Android uses to handle databases actually require an_id
column (as opposed toid
) so it's a good habit to get into to use that name for Python also.
-
Docstring
A docstring is a string literal that occurs as the first statement in a module, function, class, or method definition. Such a docstring becomes the
__doc__
special attribute of that object.- Python has the built-in function
help()
that prints out the objects docstring to the console.- How is this output generated?
- Via the
__doc__
property. - The strategic placement of the string literal directly below the
object will automatically set the
__doc__
value.
- Via the
- How is this output generated?
- Type - Class Docstrings
- The docstrings are placed immediately following the class or class method indented by one level.
- Format - ReST (reStructuredText)
-
:param <param_type> <param_name>: <param_description>
:param <param_name>: <param_description> :type <param_name>: <param_type>
-
:return: <return_description> :rtype: <return_type>
-
- Python has the built-in function