Python User Interface (Jupyter Widgets)

Posted on Tue 25 June 2019 in python

With exams over I can finally start concentrating on finding a job posting more to my blog. I have been working on a Sudoku solver and puzzle generator over the past couple of months and was keen to write this up now I have the time, but I felt frustrated that the code wasn't really going to be of use without some form of web based user interface.

A Web Based Python UI?

After exploring multiple options I'm still not convinced there is an ideal solution that doesn't involve learning Javascript or migrating the site from GitHub. If I'm overlooking something obvious please leave a comment. The best solution I can find is to impliment a degree of interactivity using Jupyter Notebook Widgets, unfortunately this interactivity is lost when converting the notebooks to html using Pelican, so it's still neccessary to link to the file hosted on GitHub. Either way, I'm excited about the potential this functionality offers for some other projects I have in mind for the future.

Jupyter Widgets demo

Binder

The notebook contains three demos. The first two build on my post on visualising sort and search algorithms to create a random colour matrix, and then allow a time slice to be selected on the bubble sorted matrix visualisation. Then lastly, building up to the next post, a method to create and display a Sudoku grid using a simple algorithm.