Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Profanity is the one language all programmers know best.


devel / comp.lang.python / Re: Free OCR package in Python and selecting appropriate widget for the GUI

SubjectAuthor
* Free OCR package in Python and selecting appropriate widget for the GUIMohsen Owzar
+* Re: Free OCR package in Python and selecting appropriate widget forDFS
|`* Re: Free OCR package in Python and selecting appropriate widget forMohsen Owzar
| +- Re: Free OCR package in Python and selecting appropriate widget forIgor Korot
| `* Re: Free OCR package in Python and selecting appropriate widget forDFS
|  `* Re: Free OCR package in Python and selecting appropriate widget forMohsen Owzar
|   `* Re: Free OCR package in Python and selecting appropriate widget forDFS
|    `* Re: Free OCR package in Python and selecting appropriate widget forMohsen Owzar
|     `- Re: Free OCR package in Python and selecting appropriate widget forMohsen Owzar
`- Re: Free OCR package in Python and selecting appropriate widget forRoland Mueller

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

<44aad2fa-366d-42fb-8012-363794b94fdbn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=19683&group=comp.lang.python#19683

  copy link   Newsgroups: comp.lang.python
X-Received: by 2002:a0c:dd87:: with SMTP id v7mr30167976qvk.45.1632213385134; Tue, 21 Sep 2021 01:36:25 -0700 (PDT)
X-Received: by 2002:a05:6214:527:: with SMTP id x7mr29341909qvw.55.1632213384907; Tue, 21 Sep 2021 01:36:24 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!tr3.eu1.usenetexpress.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.python
Date: Tue, 21 Sep 2021 01:36:24 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=31.165.67.106; posting-account=BtTavwoAAACMi3AFrA3U-JBERbxGUGhD
NNTP-Posting-Host: 31.165.67.106
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <44aad2fa-366d-42fb-8012-363794b94fdbn@googlegroups.com>
Subject: Free OCR package in Python and selecting appropriate widget for the GUI
From: mohsen.owzar@gmail.com (Mohsen Owzar)
Injection-Date: Tue, 21 Sep 2021 08:36:25 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 35
 by: Mohsen Owzar - Tue, 21 Sep 2021 08:36 UTC

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

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

<Xll2J.41228$ol1.6331@fx42.iad>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=19684&group=comp.lang.python#19684

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!aioe.org!news.dns-netz.com!news.freedyn.net!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx42.iad.POSTED!not-for-mail
Subject: Re: Free OCR package in Python and selecting appropriate widget for
the GUI
Newsgroups: comp.lang.python
References: <44aad2fa-366d-42fb-8012-363794b94fdbn@googlegroups.com>
From: nospam@dfs.com (DFS)
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.14.0
MIME-Version: 1.0
In-Reply-To: <44aad2fa-366d-42fb-8012-363794b94fdbn@googlegroups.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Lines: 12
Message-ID: <Xll2J.41228$ol1.6331@fx42.iad>
X-Complaints-To: abuse@blocknews.net
NNTP-Posting-Date: Tue, 21 Sep 2021 13:45:27 UTC
Organization: blocknews - www.blocknews.net
Date: Tue, 21 Sep 2021 09:45:17 -0400
X-Received-Bytes: 1534
 by: DFS - Tue, 21 Sep 2021 13:45 UTC

On 9/21/2021 4:36 AM, Mohsen Owzar wrote:
> 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.

Draw your GUI in PyQt designer or other graphics tool, then upload a
screenshot of it to imgur, then post the link to the picture.

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

<00d55cd0-0a3e-483b-87a9-52155877f56en@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=19705&group=comp.lang.python#19705

  copy link   Newsgroups: comp.lang.python
X-Received: by 2002:a05:6214:4c9:: with SMTP id ck9mr14150647qvb.52.1632278324962;
Tue, 21 Sep 2021 19:38:44 -0700 (PDT)
X-Received: by 2002:ad4:566c:: with SMTP id bm12mr32500379qvb.58.1632278324795;
Tue, 21 Sep 2021 19:38:44 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.python
Date: Tue, 21 Sep 2021 19:38:44 -0700 (PDT)
In-Reply-To: <Xll2J.41228$ol1.6331@fx42.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=31.165.67.106; posting-account=BtTavwoAAACMi3AFrA3U-JBERbxGUGhD
NNTP-Posting-Host: 31.165.67.106
References: <44aad2fa-366d-42fb-8012-363794b94fdbn@googlegroups.com> <Xll2J.41228$ol1.6331@fx42.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <00d55cd0-0a3e-483b-87a9-52155877f56en@googlegroups.com>
Subject: Re: Free OCR package in Python and selecting appropriate widget for
the GUI
From: mohsen.owzar@gmail.com (Mohsen Owzar)
Injection-Date: Wed, 22 Sep 2021 02:38:44 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 17
 by: Mohsen Owzar - Wed, 22 Sep 2021 02:38 UTC

DFS schrieb am Dienstag, 21. September 2021 um 15:45:38 UTC+2:
> On 9/21/2021 4:36 AM, Mohsen Owzar wrote:
> > 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.
> Draw your GUI in PyQt designer or other graphics tool, then upload a
> screenshot of it to imgur, then post the link to the picture.
Thanks, for your answer.
But, what is "imgur"?
I'm not so familiar with handling of pictures in this group.
How can I call "imgur" or how can I get there?

Regards
Mohsen

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

<mailman.770.1632279939.4164.python-list@python.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=19707&group=comp.lang.python#19707

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: ikorot01@gmail.com (Igor Korot)
Newsgroups: comp.lang.python
Subject: Re: Free OCR package in Python and selecting appropriate widget for
the GUI
Date: Tue, 21 Sep 2021 22:05:24 -0500
Lines: 31
Message-ID: <mailman.770.1632279939.4164.python-list@python.org>
References: <44aad2fa-366d-42fb-8012-363794b94fdbn@googlegroups.com>
<Xll2J.41228$ol1.6331@fx42.iad>
<00d55cd0-0a3e-483b-87a9-52155877f56en@googlegroups.com>
<CA+FnnTxRQR=MsbeocPqR8HLxHiVPzLZPftJTTW=zzRXJatDB0A@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: news.uni-berlin.de 1Xqw22GcFXJVhOBSDXzg8AaRVU4l0qkB84Igm1wa1urQ==
Return-Path: <ikorot01@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=gmail.com header.i=@gmail.com header.b=V2+rbpcS;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.004
X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'gui': 0.05; 'graphics':
0.07; 'cc:addr:python-list': 0.09; 'describe': 0.09; 'schrieb':
0.09; 'solving': 0.09; 'subject:GUI': 0.09; 'subject:Python':
0.12; '&gt;': 0.14; 'url:mailman': 0.15; 'answer.': 0.16;
'because,': 0.16; 'gui.': 0.16; 'puzzles,': 0.16; 'pyqt5': 0.16;
'subject:package': 0.16; 'url:imgur': 0.16; 'wrote:': 0.16;
'python': 0.16; 'tue,': 0.19; 'cc:addr:python.org': 0.20;
'written': 0.22; "i've": 0.22; 'code': 0.23; 'url-
ip:188.166.95.178/32': 0.25; 'url-ip:188.166.95/24': 0.25;
'python,': 0.25; 'url:listinfo': 0.25; 'cc:2**0': 0.25; 'url-
ip:188.166/16': 0.25; 'group.': 0.28; 'packages': 0.31; 'am,':
0.31; 'url-ip:188/8': 0.31; 'program': 0.31; 'question': 0.32;
'attach': 0.32; 'sep': 0.32; 'message-id:@mail.gmail.com': 0.32;
"i'm": 0.33; 'subject:for': 0.33; 'there': 0.33; 'header:In-Reply-
To:1': 0.34; 'received:google.com': 0.34; 'handling': 0.35;
'from:addr:gmail.com': 0.35; 'thanks,': 0.36; 'received:209.85':
0.37; 'received:209': 0.39; 'ago': 0.39; 'use': 0.39; 'try': 0.40;
'here': 0.62; 'your': 0.64; 'worked': 0.67; 'screenshot': 0.69;
'2021': 0.71; 'free': 0.72; 'pictures': 0.76; 'subject:Free':
0.81; 'pyqt': 0.84; 'subject: \n ': 0.84; 'positions': 0.96
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to
:cc; bh=jp+BWD0wKLchny61FXB1zfmWg/GDHiRh7lOttDu5geY=;
b=V2+rbpcSX346usJIXBSo+JB64T+CqZT6ikV5Z22li1o+shs/qfqz2oLJ5+ExPmbJ8I
d+XnupXAj0zktTTDraUlckBhi1MGbN+k+kVN46WP0e8JftZH1+tf4lYwIcx+gFj8HDrP
gPLXc9Celem6O0cpi6cmmDf3Jh9iBIQ/boji0ujNbFZQ9YuaKnpCWbsSkuxk16XyAC55
mlqwBjuAWsI/AnURG9vMznSw+eYTlsVYkV9IemLbGb9FH/tCDUa0VOuXm1GTL4+nrIyy
yZ8u7epXJQVTKFaTKDB38DzZVCPgqlDtp70Z0WqI+1TA9QnC0rFBCtmabjdBDaGAWZpe
Y6og==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to:cc;
bh=jp+BWD0wKLchny61FXB1zfmWg/GDHiRh7lOttDu5geY=;
b=6uiNBAdxXsX3jXmqmtc5Nmg3Uc+6+ZcYvlIa2Q2sdPKl/eeYuWTT4i5j/pNPh9YD56
jJQyzHIxTI2NYi55GgMhWWK+gfyA7qaKUo3ky19jS4G+QnmFevTAl8SIrSeZpS3JGifB
PXbY7MFTyVr9M8eGpeIk3mN3Ppt0DwOmnsg9M2sVJwVV2cBhaPO8MmB1GEZ5/zE9tALP
X12Jrh/oFWSVzHesQd4iZLvw7xdTeHJJaqgWZdb2okhI1vfTQ/RE3w9BA2I31PpgsQl0
8++R0HwY9vzb4ZHHUKpDhqx2pIUXHGoNhNyAeOG9Eimm3Bt2OyG5pyHzgptaOitZC+Tw
oBlQ==
X-Gm-Message-State: AOAM5310gKp86KPpU+zjU2JwQ9uLdGpA0ei+oBNhjEOkaBEiGBHgSOMB
/fp2Vy6arXUozqJklQsfu7f9aCraW8CO+1RnBNTMuAxKr4U=
X-Google-Smtp-Source: ABdhPJxd7OeY7F1Tpz4eBWixGIQM3O1ryylujJxysBIdQ1r4AaXPJ6zQBxM71Uvsl/h4oSbK4si8klf1WXPqkB33VoA=
X-Received: by 2002:a17:903:189:b0:13d:965f:e83f with SMTP id
z9-20020a170903018900b0013d965fe83fmr20950987plg.32.1632279936251; Tue, 21
Sep 2021 20:05:36 -0700 (PDT)
In-Reply-To: <00d55cd0-0a3e-483b-87a9-52155877f56en@googlegroups.com>
X-Content-Filtered-By: Mailman/MimeDel 2.1.34
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <CA+FnnTxRQR=MsbeocPqR8HLxHiVPzLZPftJTTW=zzRXJatDB0A@mail.gmail.com>
X-Mailman-Original-References: <44aad2fa-366d-42fb-8012-363794b94fdbn@googlegroups.com>
<Xll2J.41228$ol1.6331@fx42.iad>
<00d55cd0-0a3e-483b-87a9-52155877f56en@googlegroups.com>
 by: Igor Korot - Wed, 22 Sep 2021 03:05 UTC

imgur.com
Then you upload your image and post a perma-link here in reply.

On Tue, Sep 21, 2021, 22:03 Mohsen Owzar <mohsen.owzar@gmail.com> wrote:

> DFS schrieb am Dienstag, 21. September 2021 um 15:45:38 UTC+2:
> > On 9/21/2021 4:36 AM, Mohsen Owzar wrote:
> > > 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.
> > Draw your GUI in PyQt designer or other graphics tool, then upload a
> > screenshot of it to imgur, then post the link to the picture.
> Thanks, for your answer.
> But, what is "imgur"?
> I'm not so familiar with handling of pictures in this group.
> How can I call "imgur" or how can I get there?
>
> Regards
> Mohsen
> --
> https://mail.python.org/mailman/listinfo/python-list
>

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

<w8x2J.2470$fZ.2019@fx06.iad>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=19708&group=comp.lang.python#19708

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!feeder1.feed.usenet.farm!feed.usenet.farm!peer01.ams4!peer.am4.highwinds-media.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx06.iad.POSTED!not-for-mail
Subject: Re: Free OCR package in Python and selecting appropriate widget for
the GUI
Newsgroups: comp.lang.python
References: <44aad2fa-366d-42fb-8012-363794b94fdbn@googlegroups.com>
<Xll2J.41228$ol1.6331@fx42.iad>
<00d55cd0-0a3e-483b-87a9-52155877f56en@googlegroups.com>
From: nospam@dfs.com (DFS)
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.14.0
MIME-Version: 1.0
In-Reply-To: <00d55cd0-0a3e-483b-87a9-52155877f56en@googlegroups.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Lines: 27
Message-ID: <w8x2J.2470$fZ.2019@fx06.iad>
X-Complaints-To: abuse@blocknews.net
NNTP-Posting-Date: Wed, 22 Sep 2021 03:10:20 UTC
Organization: blocknews - www.blocknews.net
Date: Tue, 21 Sep 2021 23:10:18 -0400
X-Received-Bytes: 2100
 by: DFS - Wed, 22 Sep 2021 03:10 UTC

On 9/21/2021 10:38 PM, Mohsen Owzar wrote:
> DFS schrieb am Dienstag, 21. September 2021 um 15:45:38 UTC+2:
>> On 9/21/2021 4:36 AM, Mohsen Owzar wrote:
>>> 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.
>> Draw your GUI in PyQt designer or other graphics tool, then upload a
>> screenshot of it to imgur, then post the link to the picture.
> Thanks, for your answer.
> But, what is "imgur"?
> I'm not so familiar with handling of pictures in this group.
> How can I call "imgur" or how can I get there?
>
> Regards
> Mohsen

www.imgur.com

It's a website you can upload image files or screenshots to. Then you
can copy a link to your picture and post the link here.

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

<39c154b6-ccd2-4f42-9e2f-a8b86431cc23n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=19709&group=comp.lang.python#19709

  copy link   Newsgroups: comp.lang.python
X-Received: by 2002:ac8:7dd4:: with SMTP id c20mr25267011qte.46.1632290058842;
Tue, 21 Sep 2021 22:54:18 -0700 (PDT)
X-Received: by 2002:ad4:566c:: with SMTP id bm12mr33125203qvb.58.1632290058680;
Tue, 21 Sep 2021 22:54:18 -0700 (PDT)
Path: i2pn2.org!rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.python
Date: Tue, 21 Sep 2021 22:54:18 -0700 (PDT)
In-Reply-To: <w8x2J.2470$fZ.2019@fx06.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=31.165.67.106; posting-account=BtTavwoAAACMi3AFrA3U-JBERbxGUGhD
NNTP-Posting-Host: 31.165.67.106
References: <44aad2fa-366d-42fb-8012-363794b94fdbn@googlegroups.com>
<Xll2J.41228$ol1.6331@fx42.iad> <00d55cd0-0a3e-483b-87a9-52155877f56en@googlegroups.com>
<w8x2J.2470$fZ.2019@fx06.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <39c154b6-ccd2-4f42-9e2f-a8b86431cc23n@googlegroups.com>
Subject: Re: Free OCR package in Python and selecting appropriate widget for
the GUI
From: mohsen.owzar@gmail.com (Mohsen Owzar)
Injection-Date: Wed, 22 Sep 2021 05:54:18 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 29
 by: Mohsen Owzar - Wed, 22 Sep 2021 05:54 UTC

DFS schrieb am Mittwoch, 22. September 2021 um 05:10:30 UTC+2:
> On 9/21/2021 10:38 PM, Mohsen Owzar wrote:
> > DFS schrieb am Dienstag, 21. September 2021 um 15:45:38 UTC+2:
> >> On 9/21/2021 4:36 AM, Mohsen Owzar wrote:
> >>> 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.
> >> Draw your GUI in PyQt designer or other graphics tool, then upload a
> >> screenshot of it to imgur, then post the link to the picture.
> > Thanks, for your answer.
> > But, what is "imgur"?
> > I'm not so familiar with handling of pictures in this group.
> > How can I call "imgur" or how can I get there?
> >
> > Regards
> > Mohsen
> www.imgur.com
>
> It's a website you can upload image files or screenshots to. Then you
> can copy a link to your picture and post the link here.
I have already posted the link, but I can not see it anywhere.
Now, I post it again:
https://imgur.com/a/Vh8P2TE
I hope that you can see my two images.
Regards
Mohsen

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

<mailman.771.1632296305.4164.python-list@python.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=19710&group=comp.lang.python#19710

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: roland.em0001@googlemail.com (Roland Mueller)
Newsgroups: comp.lang.python
Subject: Re: Free OCR package in Python and selecting appropriate widget for
the GUI
Date: Wed, 22 Sep 2021 10:38:12 +0300
Lines: 60
Message-ID: <mailman.771.1632296305.4164.python-list@python.org>
References: <44aad2fa-366d-42fb-8012-363794b94fdbn@googlegroups.com>
<CALk2KRW+8c_+Tnf4v8eRqFkFzaE1E0FdUEO1=QJniGPGeY6kDw@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Trace: news.uni-berlin.de X6Wbg2EBzGFb73i4l9je1Qnmpu6PcgAtCxpdEo4yvayg==
Return-Path: <roland.em0001@googlemail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=googlemail.com header.i=@googlemail.com header.b=gdB4/GRt;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.004
X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'gui': 0.05; 'row': 0.05;
'e.g.': 0.07; 'suggestion': 0.07; 'describe': 0.09; 'fonts': 0.09;
'from:addr:googlemail.com': 0.09; 'integrate': 0.09; 'matrix':
0.09; 'solving': 0.09; 'subject:GUI': 0.09; 'subject:Python':
0.12; 'url:mailman': 0.15; 'because,': 0.16; 'block).': 0.16;
'empty,': 0.16; 'gui.': 0.16; 'hint': 0.16; 'ocr.': 0.16;
'puzzles,': 0.16; 'pyqt5': 0.16; 'red.': 0.16; 'subject:package':
0.16; 'python': 0.16; 'values': 0.17; 'implement': 0.19; 'to:addr
:python-list': 0.20; 'written': 0.22; "i've": 0.22; 'code': 0.23;
'command': 0.23; 'url-ip:188.166.95.178/32': 0.25; 'url-
ip:188.166.95/24': 0.25; 'python,': 0.25; 'url:listinfo': 0.25;
'url-ip:188.166/16': 0.25; 'again,': 0.26; 'interface': 0.26;
'whole': 0.30; 'packages': 0.31; 'module': 0.31; 'url-ip:188/8':
0.31; 'program': 0.31; 'question': 0.32; 'attach': 0.32; 'message-
id:@mail.gmail.com': 0.32; 'subject:for': 0.33; 'there': 0.33;
'script': 0.33; 'appreciated.': 0.34; 'package': 0.34; 'header:In-
Reply-To:1': 0.34; 'received:google.com': 0.34; 'using': 0.37;
'received:209.85': 0.37; 'could': 0.38; 'received:209': 0.39;
'ago': 0.39; 'received:209.85.208': 0.39; 'use': 0.39; 'block':
0.39; 'hello,': 0.40; 'try': 0.40; 'should': 0.40; 'best': 0.61;
'black': 0.64; 'your': 0.64; 'time.': 0.66; 'worked': 0.67;
'order.': 0.69; 'square': 0.69; 'times': 0.69; '2021': 0.71;
'content': 0.72; 'free': 0.72; 'subject:Free': 0.81; 'black.':
0.84; 'roland': 0.84; 'situations,': 0.84; 'subject: \n ': 0.84;
'\xe2\x80\xa2': 0.95; 'positions': 0.96
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=googlemail.com; s=20210112;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
bh=PXLyWo43wgUkXKeDeGkT5YZtcu4LIT2ateujvt5XExY=;
b=gdB4/GRtmmFyjOsE51m6a17WJjgWnjjbi1fPeKx8vfIKpR+s4pwjkMYyFuWESPsjVS
PUrIZJ4kseFce9ga3JYfln2N+c8TxgTHB5wcwCKFFgchpcH35zna+DXC3LfsRv5UArZ8
/6ym2RB8oWeH1jlztSy2kbglwrn7Vo5DAxR8P/eDjwNoUe02QeYkewJWejjjkTNL4Syk
ttdC9iMFO3d/CiNx0HijCE1RfUsArM7LrBceQfGDyA3fRmHMUznQ0G042iA6ONmrNk4v
+LSmin2KkxAK7X8bFLVdmDCYa5axdFRIhJytoc25Hi/uP08CEeE4XbW/JCzf7T3ka6fA
iCGQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to;
bh=PXLyWo43wgUkXKeDeGkT5YZtcu4LIT2ateujvt5XExY=;
b=Tx66OzcF159T5IeGAVk1IvXBjkduONps8D4RnclQyTt+oHWSndjtSTT79EFWoD6ES2
OjKeMVcRFcc3mfjsriY+6OXJdTwiQmnSB8v0OonjEO2MjT4NEKxApvZAXmOyU/yqHrbk
aIGKF0BFfw2V9hChisU9kM/IAzHEInO4JMNaNxCp5Ok2wkB6mJyiWZmJZOWJl2m5B2pV
C/1HktXCfJ3VeLYwM+o133Zuvpr0O2JTcduJ9SpUMszRjAvyhzHt6FzcBvzQ9+lv34Fq
MXXni7tBbo9Nbn2EXX/es6pfSST/9Mk+Gejb20yJ9e0dg66SCMW4oUdgaBCSJQNEOb/N
5iKw==
X-Gm-Message-State: AOAM532UILdchb7GMv7YHjXVGEbv+Pbl6afBCpED3mNgPTX+ozm523hy
HAZSIrQk+5EdVVucl0CqJqvp4NQs3GIoUPpmR2QkCPgTtDY=
X-Google-Smtp-Source: ABdhPJz5u9l/EmT9JXYtVdvmJ19CGTEuwZ8jzXQ0y7mlnjN5t4/92kS+g249uCtUbKdfGYEVW+/GgaIS57qkKp8p594=
X-Received: by 2002:a05:6402:1855:: with SMTP id
v21mr41733235edy.349.1632296304078;
Wed, 22 Sep 2021 00:38:24 -0700 (PDT)
In-Reply-To: <44aad2fa-366d-42fb-8012-363794b94fdbn@googlegroups.com>
X-Content-Filtered-By: Mailman/MimeDel 2.1.34
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <CALk2KRW+8c_+Tnf4v8eRqFkFzaE1E0FdUEO1=QJniGPGeY6kDw@mail.gmail.com>
X-Mailman-Original-References: <44aad2fa-366d-42fb-8012-363794b94fdbn@googlegroups.com>
 by: Roland Mueller - Wed, 22 Sep 2021 07:38 UTC

Hello,

ti 21. syysk. 2021 klo 16.53 Mohsen Owzar (mohsen.owzar@gmail.com)
kirjoitti:

> 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.
>

to my knowledge there is no Python package for OCR. Using a free OCR
package that has a command line interface one could integrate this into a
Python script that makes a call to this external OCR e.g. using Python
module subprocess.

BR,
Roland

> 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
> --
> https://mail.python.org/mailman/listinfo/python-list
>

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

<M6B2J.90633$jl2.36252@fx34.iad>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=19711&group=comp.lang.python#19711

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!aioe.org!feeder1.feed.usenet.farm!feed.usenet.farm!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx34.iad.POSTED!not-for-mail
Subject: Re: Free OCR package in Python and selecting appropriate widget for
the GUI
Newsgroups: comp.lang.python
References: <44aad2fa-366d-42fb-8012-363794b94fdbn@googlegroups.com>
<Xll2J.41228$ol1.6331@fx42.iad>
<00d55cd0-0a3e-483b-87a9-52155877f56en@googlegroups.com>
<w8x2J.2470$fZ.2019@fx06.iad>
<39c154b6-ccd2-4f42-9e2f-a8b86431cc23n@googlegroups.com>
From: nospam@dfs.com (DFS)
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.14.0
MIME-Version: 1.0
In-Reply-To: <39c154b6-ccd2-4f42-9e2f-a8b86431cc23n@googlegroups.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Lines: 495
Message-ID: <M6B2J.90633$jl2.36252@fx34.iad>
X-Complaints-To: abuse@blocknews.net
NNTP-Posting-Date: Wed, 22 Sep 2021 07:41:32 UTC
Organization: blocknews - www.blocknews.net
Date: Wed, 22 Sep 2021 03:41:31 -0400
X-Received-Bytes: 14741
 by: DFS - Wed, 22 Sep 2021 07:41 UTC

On 9/22/2021 1:54 AM, Mohsen Owzar wrote:
> DFS schrieb am Mittwoch, 22. September 2021 um 05:10:30 UTC+2:
>> On 9/21/2021 10:38 PM, Mohsen Owzar wrote:
>>> DFS schrieb am Dienstag, 21. September 2021 um 15:45:38 UTC+2:
>>>> On 9/21/2021 4:36 AM, Mohsen Owzar wrote:
>>>>> 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.
>>>> Draw your GUI in PyQt designer or other graphics tool, then upload a
>>>> screenshot of it to imgur, then post the link to the picture.
>>> Thanks, for your answer.
>>> But, what is "imgur"?
>>> I'm not so familiar with handling of pictures in this group.
>>> How can I call "imgur" or how can I get there?
>>>
>>> Regards
>>> Mohsen
>> www.imgur.com
>>
>> It's a website you can upload image files or screenshots to. Then you
>> can copy a link to your picture and post the link here.
> I have already posted the link, but I can not see it anywhere.
> Now, I post it again:
> https://imgur.com/a/Vh8P2TE
> I hope that you can see my two images.
> Regards
> Mohsen

Got it.

I haven't used tkinter. In PyQt5 designer I think you should use one
QTextEdit control for each square.

Each square with the small black font can be initially populated with

1 2 3
4 5 6
7 8 9

https://imgur.com/lTcEiML

some starter python code (maybe save as sudoku.py)

=====================================================================
from PyQt5 import Qt, QtCore, QtGui, QtWidgets, uic
from PyQt5.Qt import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *

#objects
app = QtWidgets.QApplication([])
frm = uic.loadUi("sudoku.ui")

#grid = a collection of squares
grids = 1

#squares = number of squares per grid
squares = 9

#fill the squares with 1-9
def populateSquares():
for i in range(grids,grids+1):
for j in range(1,squares+1):
widget = frm.findChild(QtWidgets.QTextEdit, "txt{}_{}".format(i,j))
widget.setText("1 2 3 4 5 6 7 8 9")

#read data from squares
def readSquares():
for i in range(grids,grids+1):
for j in range(1,squares+1):
print("txt%d_%d contains: %s" %
(i,j,frm.findChild(QtWidgets.QTextEdit,
"txt{}_{}".format(i,j)).toPlainText()))

#connect pushbuttons to code
frm.btnPopulate.clicked.connect(populateSquares)
frm.btnReadContents.clicked.connect(readSquares)

#show main form
frm.show()

#initiate application
app.exec()
=====================================================================

..ui file (ie save as sudoku.ui)
=====================================================================

<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>325</width>
<height>288</height>
</rect>
</property>
<property name="windowTitle">
<string>Sudoku</string>
</property>
<widget class="QWidget" name="centralwidget">
<widget class="QTextEdit" name="txt1_1">
<property name="geometry">
<rect>
<x>32</x>
<y>22</y>
<width>83</width>
<height>65</height>
</rect>
</property>
<property name="font">
<font>
<family>Courier</family>
<pointsize>12</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="acceptDrops">
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(0, 0, 127);
background-color: rgb(255, 255, 127);</string>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="acceptRichText">
<bool>true</bool>
</property>
</widget>
<widget class="QTextEdit" name="txt1_2">
<property name="geometry">
<rect>
<x>114</x>
<y>22</y>
<width>83</width>
<height>65</height>
</rect>
</property>
<property name="font">
<font>
<family>Courier</family>
<pointsize>12</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="acceptDrops">
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(0, 0, 127);
background-color: rgb(255, 255, 127);</string>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="acceptRichText">
<bool>true</bool>
</property>
</widget>
<widget class="QTextEdit" name="txt1_3">
<property name="geometry">
<rect>
<x>196</x>
<y>22</y>
<width>83</width>
<height>65</height>
</rect>
</property>
<property name="font">
<font>
<family>Courier</family>
<pointsize>12</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="acceptDrops">
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(0, 0, 127);
background-color: rgb(255, 255, 127);</string>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="acceptRichText">
<bool>true</bool>
</property>
</widget>
<widget class="QTextEdit" name="txt1_4">
<property name="geometry">
<rect>
<x>32</x>
<y>86</y>
<width>83</width>
<height>65</height>
</rect>
</property>
<property name="font">
<font>
<family>Courier</family>
<pointsize>12</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="acceptDrops">
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(0, 0, 127);
background-color: rgb(255, 255, 127);</string>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="acceptRichText">
<bool>true</bool>
</property>
</widget>
<widget class="QTextEdit" name="txt1_5">
<property name="geometry">
<rect>
<x>114</x>
<y>86</y>
<width>83</width>
<height>65</height>
</rect>
</property>
<property name="font">
<font>
<family>Courier</family>
<pointsize>12</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="acceptDrops">
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(0, 0, 127);
background-color: rgb(255, 255, 127);</string>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="acceptRichText">
<bool>true</bool>
</property>
</widget>
<widget class="QTextEdit" name="txt1_6">
<property name="geometry">
<rect>
<x>196</x>
<y>86</y>
<width>83</width>
<height>65</height>
</rect>
</property>
<property name="font">
<font>
<family>Courier</family>
<pointsize>12</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="acceptDrops">
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(0, 0, 127);
background-color: rgb(255, 255, 127);</string>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="acceptRichText">
<bool>true</bool>
</property>
</widget>
<widget class="QTextEdit" name="txt1_7">
<property name="geometry">
<rect>
<x>32</x>
<y>150</y>
<width>83</width>
<height>65</height>
</rect>
</property>
<property name="font">
<font>
<family>Courier</family>
<pointsize>12</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="acceptDrops">
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(0, 0, 127);
background-color: rgb(255, 255, 127);</string>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="acceptRichText">
<bool>true</bool>
</property>
</widget>
<widget class="QTextEdit" name="txt1_8">
<property name="geometry">
<rect>
<x>114</x>
<y>150</y>
<width>83</width>
<height>65</height>
</rect>
</property>
<property name="font">
<font>
<family>Courier</family>
<pointsize>12</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="acceptDrops">
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(0, 0, 127);
background-color: rgb(255, 255, 127);</string>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="acceptRichText">
<bool>true</bool>
</property>
</widget>
<widget class="QPushButton" name="btnPopulate">
<property name="geometry">
<rect>
<x>32</x>
<y>228</y>
<width>121</width>
<height>35</height>
</rect>
</property>
<property name="text">
<string>Populate with numbers</string>
</property>
</widget>
<widget class="QTextEdit" name="txt1_9">
<property name="geometry">
<rect>
<x>196</x>
<y>150</y>
<width>83</width>
<height>65</height>
</rect>
</property>
<property name="font">
<font>
<family>Courier</family>
<pointsize>12</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="acceptDrops">
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(0, 0, 127);
background-color: rgb(255, 255, 127);</string>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="acceptRichText">
<bool>true</bool>
</property>
</widget>
<widget class="QPushButton" name="btnReadContents">
<property name="geometry">
<rect>
<x>170</x>
<y>228</y>
<width>109</width>
<height>35</height>
</rect>
</property>
<property name="text">
<string>Read contents</string>
</property>
</widget>
</widget>
<widget class="QStatusBar" name="statusbar"/>
</widget>
<resources/>
<connections/>
</ui>


Click here to read the complete article
Re: Free OCR package in Python and selecting appropriate widget for the GUI

<b5f05269-e7f1-4eec-93ae-8e91c39c0822n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=19723&group=comp.lang.python#19723

  copy link   Newsgroups: comp.lang.python
X-Received: by 2002:ac8:5290:: with SMTP id s16mr3207437qtn.412.1632379984629;
Wed, 22 Sep 2021 23:53:04 -0700 (PDT)
X-Received: by 2002:ae9:de06:: with SMTP id s6mr3324286qkf.489.1632379984440;
Wed, 22 Sep 2021 23:53:04 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.python
Date: Wed, 22 Sep 2021 23:53:04 -0700 (PDT)
In-Reply-To: <M6B2J.90633$jl2.36252@fx34.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=31.165.67.106; posting-account=BtTavwoAAACMi3AFrA3U-JBERbxGUGhD
NNTP-Posting-Host: 31.165.67.106
References: <44aad2fa-366d-42fb-8012-363794b94fdbn@googlegroups.com>
<Xll2J.41228$ol1.6331@fx42.iad> <00d55cd0-0a3e-483b-87a9-52155877f56en@googlegroups.com>
<w8x2J.2470$fZ.2019@fx06.iad> <39c154b6-ccd2-4f42-9e2f-a8b86431cc23n@googlegroups.com>
<M6B2J.90633$jl2.36252@fx34.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b5f05269-e7f1-4eec-93ae-8e91c39c0822n@googlegroups.com>
Subject: Re: Free OCR package in Python and selecting appropriate widget for
the GUI
From: mohsen.owzar@gmail.com (Mohsen Owzar)
Injection-Date: Thu, 23 Sep 2021 06:53:04 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 492
 by: Mohsen Owzar - Thu, 23 Sep 2021 06:53 UTC

DFS schrieb am Mittwoch, 22. September 2021 um 09:41:42 UTC+2:
> On 9/22/2021 1:54 AM, Mohsen Owzar wrote:
> > DFS schrieb am Mittwoch, 22. September 2021 um 05:10:30 UTC+2:
> >> On 9/21/2021 10:38 PM, Mohsen Owzar wrote:
> >>> DFS schrieb am Dienstag, 21. September 2021 um 15:45:38 UTC+2:
> >>>> On 9/21/2021 4:36 AM, Mohsen Owzar wrote:
> >>>>> 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.
> >>>> Draw your GUI in PyQt designer or other graphics tool, then upload a
> >>>> screenshot of it to imgur, then post the link to the picture.
> >>> Thanks, for your answer.
> >>> But, what is "imgur"?
> >>> I'm not so familiar with handling of pictures in this group.
> >>> How can I call "imgur" or how can I get there?
> >>>
> >>> Regards
> >>> Mohsen
> >> www.imgur.com
> >>
> >> It's a website you can upload image files or screenshots to. Then you
> >> can copy a link to your picture and post the link here.
> > I have already posted the link, but I can not see it anywhere.
> > Now, I post it again:
> > https://imgur.com/a/Vh8P2TE
> > I hope that you can see my two images.
> > Regards
> > Mohsen
> Got it.
>
> I haven't used tkinter. In PyQt5 designer I think you should use one
> QTextEdit control for each square.
>
>
> Each square with the small black font can be initially populated with
>
> 1 2 3
> 4 5 6
> 7 8 9
>
>
>
> https://imgur.com/lTcEiML
>
>
>
> some starter python code (maybe save as sudoku.py)
>
> =====================================================================
> from PyQt5 import Qt, QtCore, QtGui, QtWidgets, uic
> from PyQt5.Qt import *
> from PyQt5.QtCore import *
> from PyQt5.QtGui import *
> from PyQt5.QtWidgets import *
>
> #objects
> app = QtWidgets.QApplication([])
> frm = uic.loadUi("sudoku.ui")
>
>
> #grid = a collection of squares
> grids = 1
>
> #squares = number of squares per grid
> squares = 9
>
> #fill the squares with 1-9
> def populateSquares():
> for i in range(grids,grids+1):
> for j in range(1,squares+1):
> widget = frm.findChild(QtWidgets.QTextEdit, "txt{}_{}".format(i,j))
> widget.setText("1 2 3 4 5 6 7 8 9")
>
> #read data from squares
> def readSquares():
> for i in range(grids,grids+1):
> for j in range(1,squares+1):
> print("txt%d_%d contains: %s" %
> (i,j,frm.findChild(QtWidgets.QTextEdit,
> "txt{}_{}".format(i,j)).toPlainText()))
>
>
> #connect pushbuttons to code
> frm.btnPopulate.clicked.connect(populateSquares)
> frm.btnReadContents.clicked.connect(readSquares)
>
> #show main form
> frm.show()
>
> #initiate application
> app.exec()
> =====================================================================
>
>
>
>
>
> .ui file (ie save as sudoku.ui)
> =====================================================================
>
> <?xml version="1.0" encoding="UTF-8"?>
> <ui version="4.0">
> <class>MainWindow</class>
> <widget class="QMainWindow" name="MainWindow">
> <property name="geometry">
> <rect>
> <x>0</x>
> <y>0</y>
> <width>325</width>
> <height>288</height>
> </rect>
> </property>
> <property name="windowTitle">
> <string>Sudoku</string>
> </property>
> <widget class="QWidget" name="centralwidget">
> <widget class="QTextEdit" name="txt1_1">
> <property name="geometry">
> <rect>
> <x>32</x>
> <y>22</y>
> <width>83</width>
> <height>65</height>
> </rect>
> </property>
> <property name="font">
> <font>
> <family>Courier</family>
> <pointsize>12</pointsize>
> <weight>50</weight>
> <bold>false</bold>
> </font>
> </property>
> <property name="acceptDrops">
> <bool>false</bool>
> </property>
> <property name="styleSheet">
> <string notr="true">color: rgb(0, 0, 127);
> background-color: rgb(255, 255, 127);</string>
> </property>
> <property name="frameShape">
> <enum>QFrame::StyledPanel</enum>
> </property>
> <property name="frameShadow">
> <enum>QFrame::Sunken</enum>
> </property>
> <property name="horizontalScrollBarPolicy">
> <enum>Qt::ScrollBarAlwaysOff</enum>
> </property>
> <property name="acceptRichText">
> <bool>true</bool>
> </property>
> </widget>
> <widget class="QTextEdit" name="txt1_2">
> <property name="geometry">
> <rect>
> <x>114</x>
> <y>22</y>
> <width>83</width>
> <height>65</height>
> </rect>
> </property>
> <property name="font">
> <font>
> <family>Courier</family>
> <pointsize>12</pointsize>
> <weight>50</weight>
> <bold>false</bold>
> </font>
> </property>
> <property name="acceptDrops">
> <bool>false</bool>
> </property>
> <property name="styleSheet">
> <string notr="true">color: rgb(0, 0, 127);
> background-color: rgb(255, 255, 127);</string>
> </property>
> <property name="frameShape">
> <enum>QFrame::StyledPanel</enum>
> </property>
> <property name="frameShadow">
> <enum>QFrame::Sunken</enum>
> </property>
> <property name="horizontalScrollBarPolicy">
> <enum>Qt::ScrollBarAlwaysOff</enum>
> </property>
> <property name="acceptRichText">
> <bool>true</bool>
> </property>
> </widget>
> <widget class="QTextEdit" name="txt1_3">
> <property name="geometry">
> <rect>
> <x>196</x>
> <y>22</y>
> <width>83</width>
> <height>65</height>
> </rect>
> </property>
> <property name="font">
> <font>
> <family>Courier</family>
> <pointsize>12</pointsize>
> <weight>50</weight>
> <bold>false</bold>
> </font>
> </property>
> <property name="acceptDrops">
> <bool>false</bool>
> </property>
> <property name="styleSheet">
> <string notr="true">color: rgb(0, 0, 127);
> background-color: rgb(255, 255, 127);</string>
> </property>
> <property name="frameShape">
> <enum>QFrame::StyledPanel</enum>
> </property>
> <property name="frameShadow">
> <enum>QFrame::Sunken</enum>
> </property>
> <property name="horizontalScrollBarPolicy">
> <enum>Qt::ScrollBarAlwaysOff</enum>
> </property>
> <property name="acceptRichText">
> <bool>true</bool>
> </property>
> </widget>
> <widget class="QTextEdit" name="txt1_4">
> <property name="geometry">
> <rect>
> <x>32</x>
> <y>86</y>
> <width>83</width>
> <height>65</height>
> </rect>
> </property>
> <property name="font">
> <font>
> <family>Courier</family>
> <pointsize>12</pointsize>
> <weight>50</weight>
> <bold>false</bold>
> </font>
> </property>
> <property name="acceptDrops">
> <bool>false</bool>
> </property>
> <property name="styleSheet">
> <string notr="true">color: rgb(0, 0, 127);
> background-color: rgb(255, 255, 127);</string>
> </property>
> <property name="frameShape">
> <enum>QFrame::StyledPanel</enum>
> </property>
> <property name="frameShadow">
> <enum>QFrame::Sunken</enum>
> </property>
> <property name="horizontalScrollBarPolicy">
> <enum>Qt::ScrollBarAlwaysOff</enum>
> </property>
> <property name="acceptRichText">
> <bool>true</bool>
> </property>
> </widget>
> <widget class="QTextEdit" name="txt1_5">
> <property name="geometry">
> <rect>
> <x>114</x>
> <y>86</y>
> <width>83</width>
> <height>65</height>
> </rect>
> </property>
> <property name="font">
> <font>
> <family>Courier</family>
> <pointsize>12</pointsize>
> <weight>50</weight>
> <bold>false</bold>
> </font>
> </property>
> <property name="acceptDrops">
> <bool>false</bool>
> </property>
> <property name="styleSheet">
> <string notr="true">color: rgb(0, 0, 127);
> background-color: rgb(255, 255, 127);</string>
> </property>
> <property name="frameShape">
> <enum>QFrame::StyledPanel</enum>
> </property>
> <property name="frameShadow">
> <enum>QFrame::Sunken</enum>
> </property>
> <property name="horizontalScrollBarPolicy">
> <enum>Qt::ScrollBarAlwaysOff</enum>
> </property>
> <property name="acceptRichText">
> <bool>true</bool>
> </property>
> </widget>
> <widget class="QTextEdit" name="txt1_6">
> <property name="geometry">
> <rect>
> <x>196</x>
> <y>86</y>
> <width>83</width>
> <height>65</height>
> </rect>
> </property>
> <property name="font">
> <font>
> <family>Courier</family>
> <pointsize>12</pointsize>
> <weight>50</weight>
> <bold>false</bold>
> </font>
> </property>
> <property name="acceptDrops">
> <bool>false</bool>
> </property>
> <property name="styleSheet">
> <string notr="true">color: rgb(0, 0, 127);
> background-color: rgb(255, 255, 127);</string>
> </property>
> <property name="frameShape">
> <enum>QFrame::StyledPanel</enum>
> </property>
> <property name="frameShadow">
> <enum>QFrame::Sunken</enum>
> </property>
> <property name="horizontalScrollBarPolicy">
> <enum>Qt::ScrollBarAlwaysOff</enum>
> </property>
> <property name="acceptRichText">
> <bool>true</bool>
> </property>
> </widget>
> <widget class="QTextEdit" name="txt1_7">
> <property name="geometry">
> <rect>
> <x>32</x>
> <y>150</y>
> <width>83</width>
> <height>65</height>
> </rect>
> </property>
> <property name="font">
> <font>
> <family>Courier</family>
> <pointsize>12</pointsize>
> <weight>50</weight>
> <bold>false</bold>
> </font>
> </property>
> <property name="acceptDrops">
> <bool>false</bool>
> </property>
> <property name="styleSheet">
> <string notr="true">color: rgb(0, 0, 127);
> background-color: rgb(255, 255, 127);</string>
> </property>
> <property name="frameShape">
> <enum>QFrame::StyledPanel</enum>
> </property>
> <property name="frameShadow">
> <enum>QFrame::Sunken</enum>
> </property>
> <property name="horizontalScrollBarPolicy">
> <enum>Qt::ScrollBarAlwaysOff</enum>
> </property>
> <property name="acceptRichText">
> <bool>true</bool>
> </property>
> </widget>
> <widget class="QTextEdit" name="txt1_8">
> <property name="geometry">
> <rect>
> <x>114</x>
> <y>150</y>
> <width>83</width>
> <height>65</height>
> </rect>
> </property>
> <property name="font">
> <font>
> <family>Courier</family>
> <pointsize>12</pointsize>
> <weight>50</weight>
> <bold>false</bold>
> </font>
> </property>
> <property name="acceptDrops">
> <bool>false</bool>
> </property>
> <property name="styleSheet">
> <string notr="true">color: rgb(0, 0, 127);
> background-color: rgb(255, 255, 127);</string>
> </property>
> <property name="frameShape">
> <enum>QFrame::StyledPanel</enum>
> </property>
> <property name="frameShadow">
> <enum>QFrame::Sunken</enum>
> </property>
> <property name="horizontalScrollBarPolicy">
> <enum>Qt::ScrollBarAlwaysOff</enum>
> </property>
> <property name="acceptRichText">
> <bool>true</bool>
> </property>
> </widget>
> <widget class="QPushButton" name="btnPopulate">
> <property name="geometry">
> <rect>
> <x>32</x>
> <y>228</y>
> <width>121</width>
> <height>35</height>
> </rect>
> </property>
> <property name="text">
> <string>Populate with numbers</string>
> </property>
> </widget>
> <widget class="QTextEdit" name="txt1_9">
> <property name="geometry">
> <rect>
> <x>196</x>
> <y>150</y>
> <width>83</width>
> <height>65</height>
> </rect>
> </property>
> <property name="font">
> <font>
> <family>Courier</family>
> <pointsize>12</pointsize>
> <weight>50</weight>
> <bold>false</bold>
> </font>
> </property>
> <property name="acceptDrops">
> <bool>false</bool>
> </property>
> <property name="styleSheet">
> <string notr="true">color: rgb(0, 0, 127);
> background-color: rgb(255, 255, 127);</string>
> </property>
> <property name="frameShape">
> <enum>QFrame::StyledPanel</enum>
> </property>
> <property name="frameShadow">
> <enum>QFrame::Sunken</enum>
> </property>
> <property name="horizontalScrollBarPolicy">
> <enum>Qt::ScrollBarAlwaysOff</enum>
> </property>
> <property name="acceptRichText">
> <bool>true</bool>
> </property>
> </widget>
> <widget class="QPushButton" name="btnReadContents">
> <property name="geometry">
> <rect>
> <x>170</x>
> <y>228</y>
> <width>109</width>
> <height>35</height>
> </rect>
> </property>
> <property name="text">
> <string>Read contents</string>
> </property>
> </widget>
> </widget>
> <widget class="QStatusBar" name="statusbar"/>
> </widget>
> <resources/>
> <connections/>
> </ui>
>
> =====================================================================
Thank you,


Click here to read the complete article
Re: Free OCR package in Python and selecting appropriate widget for the GUI

<5b91d630-a9f5-453f-916a-b91d40246327n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=19811&group=comp.lang.python#19811

  copy link   Newsgroups: comp.lang.python
X-Received: by 2002:a37:9181:: with SMTP id t123mr19802651qkd.45.1632675256474;
Sun, 26 Sep 2021 09:54:16 -0700 (PDT)
X-Received: by 2002:a05:6214:683:: with SMTP id r3mr20624554qvz.39.1632675256232;
Sun, 26 Sep 2021 09:54:16 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.python
Date: Sun, 26 Sep 2021 09:54:16 -0700 (PDT)
In-Reply-To: <b5f05269-e7f1-4eec-93ae-8e91c39c0822n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:1711:fa54:36a0:3c97:4950:5dc0:d4a0;
posting-account=BtTavwoAAACMi3AFrA3U-JBERbxGUGhD
NNTP-Posting-Host: 2001:1711:fa54:36a0:3c97:4950:5dc0:d4a0
References: <44aad2fa-366d-42fb-8012-363794b94fdbn@googlegroups.com>
<Xll2J.41228$ol1.6331@fx42.iad> <00d55cd0-0a3e-483b-87a9-52155877f56en@googlegroups.com>
<w8x2J.2470$fZ.2019@fx06.iad> <39c154b6-ccd2-4f42-9e2f-a8b86431cc23n@googlegroups.com>
<M6B2J.90633$jl2.36252@fx34.iad> <b5f05269-e7f1-4eec-93ae-8e91c39c0822n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <5b91d630-a9f5-453f-916a-b91d40246327n@googlegroups.com>
Subject: Re: Free OCR package in Python and selecting appropriate widget for
the GUI
From: mohsen.owzar@gmail.com (Mohsen Owzar)
Injection-Date: Sun, 26 Sep 2021 16:54:16 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 538
 by: Mohsen Owzar - Sun, 26 Sep 2021 16:54 UTC

Mohsen Owzar schrieb am Donnerstag, 23. September 2021 um 08:53:15 UTC+2:
> DFS schrieb am Mittwoch, 22. September 2021 um 09:41:42 UTC+2:
> > On 9/22/2021 1:54 AM, Mohsen Owzar wrote:
> > > DFS schrieb am Mittwoch, 22. September 2021 um 05:10:30 UTC+2:
> > >> On 9/21/2021 10:38 PM, Mohsen Owzar wrote:
> > >>> DFS schrieb am Dienstag, 21. September 2021 um 15:45:38 UTC+2:
> > >>>> On 9/21/2021 4:36 AM, Mohsen Owzar wrote:
> > >>>>> 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.
> > >>>> Draw your GUI in PyQt designer or other graphics tool, then upload a
> > >>>> screenshot of it to imgur, then post the link to the picture.
> > >>> Thanks, for your answer. Hi
> > >>> But, what is "imgur"?
> > >>> I'm not so familiar with handling of pictures in this group.
> > >>> How can I call "imgur" or how can I get there?
> > >>>
> > >>> Regards
> > >>> Mohsen
> > >> www.imgur.com
> > >>
> > >> It's a website you can upload image files or screenshots to. Then you
> > >> can copy a link to your picture and post the link here.
> > > I have already posted the link, but I can not see it anywhere.
> > > Now, I post it again:
> > > https://imgur.com/a/Vh8P2TE
> > > I hope that you can see my two images.
> > > Regards
> > > Mohsen
> > Got it.
> >
> > I haven't used tkinter. In PyQt5 designer I think you should use one
> > QTextEdit control for each square.
> >
> >
> > Each square with the small black font can be initially populated with
> >
> > 1 2 3
> > 4 5 6
> > 7 8 9
> >
> >
> >
> > https://imgur.com/lTcEiML
> >
> >
> >
> > some starter python code (maybe save as sudoku.py)
> >
> > =====================================================================
> > from PyQt5 import Qt, QtCore, QtGui, QtWidgets, uic
> > from PyQt5.Qt import *
> > from PyQt5.QtCore import *
> > from PyQt5.QtGui import *
> > from PyQt5.QtWidgets import *
> >
> > #objects
> > app = QtWidgets.QApplication([])
> > frm = uic.loadUi("sudoku.ui")
> >
> >
> > #grid = a collection of squares
> > grids = 1
> >
> > #squares = number of squares per grid
> > squares = 9
> >
> > #fill the squares with 1-9
> > def populateSquares():
> > for i in range(grids,grids+1):
> > for j in range(1,squares+1):
> > widget = frm.findChild(QtWidgets.QTextEdit, "txt{}_{}".format(i,j))
> > widget.setText("1 2 3 4 5 6 7 8 9")
> >
> > #read data from squares
> > def readSquares():
> > for i in range(grids,grids+1):
> > for j in range(1,squares+1):
> > print("txt%d_%d contains: %s" %
> > (i,j,frm.findChild(QtWidgets.QTextEdit,
> > "txt{}_{}".format(i,j)).toPlainText()))
> >
> >
> > #connect pushbuttons to code
> > frm.btnPopulate.clicked.connect(populateSquares)
> > frm.btnReadContents.clicked.connect(readSquares)
> >
> > #show main form
> > frm.show()
> >
> > #initiate application
> > app.exec()
> > =====================================================================
> >
> >
> >
> >
> >
> > .ui file (ie save as sudoku.ui)
> > =====================================================================
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <ui version="4.0">
> > <class>MainWindow</class>
> > <widget class="QMainWindow" name="MainWindow">
> > <property name="geometry">
> > <rect>
> > <x>0</x>
> > <y>0</y>
> > <width>325</width>
> > <height>288</height>
> > </rect>
> > </property>
> > <property name="windowTitle">
> > <string>Sudoku</string>
> > </property>
> > <widget class="QWidget" name="centralwidget">
> > <widget class="QTextEdit" name="txt1_1">
> > <property name="geometry">
> > <rect>
> > <x>32</x>
> > <y>22</y>
> > <width>83</width>
> > <height>65</height>
> > </rect>
> > </property>
> > <property name="font">
> > <font>
> > <family>Courier</family>
> > <pointsize>12</pointsize>
> > <weight>50</weight>
> > <bold>false</bold>
> > </font>
> > </property>
> > <property name="acceptDrops">
> > <bool>false</bool>
> > </property>
> > <property name="styleSheet">
> > <string notr="true">color: rgb(0, 0, 127);
> > background-color: rgb(255, 255, 127);</string>
> > </property>
> > <property name="frameShape">
> > <enum>QFrame::StyledPanel</enum>
> > </property>
> > <property name="frameShadow">
> > <enum>QFrame::Sunken</enum>
> > </property>
> > <property name="horizontalScrollBarPolicy">
> > <enum>Qt::ScrollBarAlwaysOff</enum>
> > </property>
> > <property name="acceptRichText">
> > <bool>true</bool>
> > </property>
> > </widget>
> > <widget class="QTextEdit" name="txt1_2">
> > <property name="geometry">
> > <rect>
> > <x>114</x>
> > <y>22</y>
> > <width>83</width>
> > <height>65</height>
> > </rect>
> > </property>
> > <property name="font">
> > <font>
> > <family>Courier</family>
> > <pointsize>12</pointsize>
> > <weight>50</weight>
> > <bold>false</bold>
> > </font>
> > </property>
> > <property name="acceptDrops">
> > <bool>false</bool>
> > </property>
> > <property name="styleSheet">
> > <string notr="true">color: rgb(0, 0, 127);
> > background-color: rgb(255, 255, 127);</string>
> > </property>
> > <property name="frameShape">
> > <enum>QFrame::StyledPanel</enum>
> > </property>
> > <property name="frameShadow">
> > <enum>QFrame::Sunken</enum>
> > </property>
> > <property name="horizontalScrollBarPolicy">
> > <enum>Qt::ScrollBarAlwaysOff</enum>
> > </property>
> > <property name="acceptRichText">
> > <bool>true</bool>
> > </property>
> > </widget>
> > <widget class="QTextEdit" name="txt1_3">
> > <property name="geometry">
> > <rect>
> > <x>196</x>
> > <y>22</y>
> > <width>83</width>
> > <height>65</height>
> > </rect>
> > </property>
> > <property name="font">
> > <font>
> > <family>Courier</family>
> > <pointsize>12</pointsize>
> > <weight>50</weight>
> > <bold>false</bold>
> > </font>
> > </property>
> > <property name="acceptDrops">
> > <bool>false</bool>
> > </property>
> > <property name="styleSheet">
> > <string notr="true">color: rgb(0, 0, 127);
> > background-color: rgb(255, 255, 127);</string>
> > </property>
> > <property name="frameShape">
> > <enum>QFrame::StyledPanel</enum>
> > </property>
> > <property name="frameShadow">
> > <enum>QFrame::Sunken</enum>
> > </property>
> > <property name="horizontalScrollBarPolicy">
> > <enum>Qt::ScrollBarAlwaysOff</enum>
> > </property>
> > <property name="acceptRichText">
> > <bool>true</bool>
> > </property>
> > </widget>
> > <widget class="QTextEdit" name="txt1_4">
> > <property name="geometry">
> > <rect>
> > <x>32</x>
> > <y>86</y>
> > <width>83</width>
> > <height>65</height>
> > </rect>
> > </property>
> > <property name="font">
> > <font>
> > <family>Courier</family>
> > <pointsize>12</pointsize>
> > <weight>50</weight>
> > <bold>false</bold>
> > </font>
> > </property>
> > <property name="acceptDrops">
> > <bool>false</bool>
> > </property>
> > <property name="styleSheet">
> > <string notr="true">color: rgb(0, 0, 127);
> > background-color: rgb(255, 255, 127);</string>
> > </property>
> > <property name="frameShape">
> > <enum>QFrame::StyledPanel</enum>
> > </property>
> > <property name="frameShadow">
> > <enum>QFrame::Sunken</enum>
> > </property>
> > <property name="horizontalScrollBarPolicy">
> > <enum>Qt::ScrollBarAlwaysOff</enum>
> > </property>
> > <property name="acceptRichText">
> > <bool>true</bool>
> > </property>
> > </widget>
> > <widget class="QTextEdit" name="txt1_5">
> > <property name="geometry">
> > <rect>
> > <x>114</x>
> > <y>86</y>
> > <width>83</width>
> > <height>65</height>
> > </rect>
> > </property>
> > <property name="font">
> > <font>
> > <family>Courier</family>
> > <pointsize>12</pointsize>
> > <weight>50</weight>
> > <bold>false</bold>
> > </font>
> > </property>
> > <property name="acceptDrops">
> > <bool>false</bool>
> > </property>
> > <property name="styleSheet">
> > <string notr="true">color: rgb(0, 0, 127);
> > background-color: rgb(255, 255, 127);</string>
> > </property>
> > <property name="frameShape">
> > <enum>QFrame::StyledPanel</enum>
> > </property>
> > <property name="frameShadow">
> > <enum>QFrame::Sunken</enum>
> > </property>
> > <property name="horizontalScrollBarPolicy">
> > <enum>Qt::ScrollBarAlwaysOff</enum>
> > </property>
> > <property name="acceptRichText">
> > <bool>true</bool>
> > </property>
> > </widget>
> > <widget class="QTextEdit" name="txt1_6">
> > <property name="geometry">
> > <rect>
> > <x>196</x>
> > <y>86</y>
> > <width>83</width>
> > <height>65</height>
> > </rect>
> > </property>
> > <property name="font">
> > <font>
> > <family>Courier</family>
> > <pointsize>12</pointsize>
> > <weight>50</weight>
> > <bold>false</bold>
> > </font>
> > </property>
> > <property name="acceptDrops">
> > <bool>false</bool>
> > </property>
> > <property name="styleSheet">
> > <string notr="true">color: rgb(0, 0, 127);
> > background-color: rgb(255, 255, 127);</string>
> > </property>
> > <property name="frameShape">
> > <enum>QFrame::StyledPanel</enum>
> > </property>
> > <property name="frameShadow">
> > <enum>QFrame::Sunken</enum>
> > </property>
> > <property name="horizontalScrollBarPolicy">
> > <enum>Qt::ScrollBarAlwaysOff</enum>
> > </property>
> > <property name="acceptRichText">
> > <bool>true</bool>
> > </property>
> > </widget>
> > <widget class="QTextEdit" name="txt1_7">
> > <property name="geometry">
> > <rect>
> > <x>32</x>
> > <y>150</y>
> > <width>83</width>
> > <height>65</height>
> > </rect>
> > </property>
> > <property name="font">
> > <font>
> > <family>Courier</family>
> > <pointsize>12</pointsize>
> > <weight>50</weight>
> > <bold>false</bold>
> > </font>
> > </property>
> > <property name="acceptDrops">
> > <bool>false</bool>
> > </property>
> > <property name="styleSheet">
> > <string notr="true">color: rgb(0, 0, 127);
> > background-color: rgb(255, 255, 127);</string>
> > </property>
> > <property name="frameShape">
> > <enum>QFrame::StyledPanel</enum>
> > </property>
> > <property name="frameShadow">
> > <enum>QFrame::Sunken</enum>
> > </property>
> > <property name="horizontalScrollBarPolicy">
> > <enum>Qt::ScrollBarAlwaysOff</enum>
> > </property>
> > <property name="acceptRichText">
> > <bool>true</bool>
> > </property>
> > </widget>
> > <widget class="QTextEdit" name="txt1_8">
> > <property name="geometry">
> > <rect>
> > <x>114</x>
> > <y>150</y>
> > <width>83</width>
> > <height>65</height>
> > </rect>
> > </property>
> > <property name="font">
> > <font>
> > <family>Courier</family>
> > <pointsize>12</pointsize>
> > <weight>50</weight>
> > <bold>false</bold>
> > </font>
> > </property>
> > <property name="acceptDrops">
> > <bool>false</bool>
> > </property>
> > <property name="styleSheet">
> > <string notr="true">color: rgb(0, 0, 127);
> > background-color: rgb(255, 255, 127);</string>
> > </property>
> > <property name="frameShape">
> > <enum>QFrame::StyledPanel</enum>
> > </property>
> > <property name="frameShadow">
> > <enum>QFrame::Sunken</enum>
> > </property>
> > <property name="horizontalScrollBarPolicy">
> > <enum>Qt::ScrollBarAlwaysOff</enum>
> > </property>
> > <property name="acceptRichText">
> > <bool>true</bool>
> > </property>
> > </widget>
> > <widget class="QPushButton" name="btnPopulate">
> > <property name="geometry">
> > <rect>
> > <x>32</x>
> > <y>228</y>
> > <width>121</width>
> > <height>35</height>
> > </rect>
> > </property>
> > <property name="text">
> > <string>Populate with numbers</string>
> > </property>
> > </widget>
> > <widget class="QTextEdit" name="txt1_9">
> > <property name="geometry">
> > <rect>
> > <x>196</x>
> > <y>150</y>
> > <width>83</width>
> > <height>65</height>
> > </rect>
> > </property>
> > <property name="font">
> > <font>
> > <family>Courier</family>
> > <pointsize>12</pointsize>
> > <weight>50</weight>
> > <bold>false</bold>
> > </font>
> > </property>
> > <property name="acceptDrops">
> > <bool>false</bool>
> > </property>
> > <property name="styleSheet">
> > <string notr="true">color: rgb(0, 0, 127);
> > background-color: rgb(255, 255, 127);</string>
> > </property>
> > <property name="frameShape">
> > <enum>QFrame::StyledPanel</enum>
> > </property>
> > <property name="frameShadow">
> > <enum>QFrame::Sunken</enum>
> > </property>
> > <property name="horizontalScrollBarPolicy">
> > <enum>Qt::ScrollBarAlwaysOff</enum>
> > </property>
> > <property name="acceptRichText">
> > <bool>true</bool>
> > </property>
> > </widget>
> > <widget class="QPushButton" name="btnReadContents">
> > <property name="geometry">
> > <rect>
> > <x>170</x>
> > <y>228</y>
> > <width>109</width>
> > <height>35</height>
> > </rect>
> > </property>
> > <property name="text">
> > <string>Read contents</string>
> > </property>
> > </widget>
> > </widget>
> > <widget class="QStatusBar" name="statusbar"/>
> > </widget>
> > <resources/>
> > <connections/>
> > </ui>
> >
> > ====================================================================> Thank you,
>
> I'll try to use this QTextEdit, to see if I'm able to manage my needs.
>
> Regards
> Mohsen


Click here to read the complete article

devel / comp.lang.python / Re: Free OCR package in Python and selecting appropriate widget for the GUI

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor