Free OCR package in Python and selecting appropriate widget for the GUI

Mohsen Owzar mohsen.owzar at gmail.com
Tue Sep 21 04:36:24 EDT 2021


Hi Guys
Long time ago I've written a program in Malab a GUI for solving Sudoku puzzles, which worked not so bad.
Now I try to write this GUI with Python with PyQt5 or TKinter.
First question is:
Is there any free OCR software, packages or code in Python, which I can use to recognize the given digits and their positions in the puzzle square.
Second:
Because, I can not attach a picture to this post, I try to describe my picture of my GUI.
It is a 3x3 block / matrix (one third of the whole Sudoku 9x9 block).
This block must be placed three times in row and columns.
Each square of this 3x3 block has 3x3 digits from 1 to 9 at the initialization time. These digits are spread out in 3x3 equal distances. These are small fonts and black.
The values given by the puzzle are red big fonts and not changeable
The digits typed by the user are black big fonts and changeable
If there is a big font from the Puzzle / User, these must be removed from the neighboring fields from the 3x3 matrix (1-9).
Now my question is, actually a hint from your side:
What should I take as widget for one of these small squares to have different content as I described above?
I thought of a QLineEdit in PyQt5 or LineEdit in TKinter, because the user must type some values in there and therefore can not be labels. So again, for the sake of the clarity.
•	When the fields are empty, each square has to show digits from 1 to 9 with small fonts in 3x3 matrix order.
•	Given values in the puzzle are big fonts and red.
•	Digits which are typed by the user are big fonts and black.
Now the question is, can I take only one LineEdit for all these tree situations, or I have to implement 9 small squares for small fonts and a big one for the big fonts?
Any help and suggestion is welcome and appreciated.

Best regards 
Mohsen


More information about the Python-list mailing list