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

2021-09-21 Thread Igor Korot
imgur.com Then you upload your image and post a perma-link here in reply. On Tue, Sep 21, 2021, 22:03 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 Ma

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

2021-09-21 Thread Mohsen Owzar
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 TKint

Re: XML Considered Harmful

2021-09-21 Thread Dan Stromberg
On Tue, Sep 21, 2021 at 7:26 PM Michael F. Stemper < michael.stem...@gmail.com> wrote: > If XML is not the way to package data, what is the recommended > approach? > I prefer both JSON and YAML over XML. XML has both elements and tags, but it didn't really need both. This results in more complex

Re: XML Considered Harmful

2021-09-21 Thread Ethan Furman
On 9/21/21 11:12 AM, Michael F. Stemper wrote: > It seems to me that XML is the right approach for this sort of > thing, especially since the data is hierarchical in nature. If you're looking for a format that you can read (as a human) and possibly hand-edit, check out NestedText: https://ne

Re: XML Considered Harmful

2021-09-21 Thread Eli the Bearded
In comp.lang.python, Michael F. Stemper wrote: > I've heard of JSON, but never done anything with it. You probably have used it inadvertantly on a regular basis over the past few years. Websites live on it. > How does CSV handle hierarchical data? For instance, I have > generators[1], each of wh

Re: XML Considered Harmful

2021-09-21 Thread Jon Ribbens via Python-list
On 2021-09-21, Pete Forman wrote: > CSV is quite good as a lowest common denominator exchange format. I say > quite because I would characterize it by 8 attributes and you need to > pick a dialect such as MS Excel which sets out what those are. XML and > JSON are controlled much better. You can ea

Re: XML Considered Harmful

2021-09-21 Thread Joe Pfeiffer
r...@zedat.fu-berlin.de (Stefan Ram) writes: > - S expressions (i.e., LISP notation) If you're looking at hierarchical data and you don't have some good reason to use something else, this is very likely to be your simplest option. -- https://mail.python.org/mailman/listinfo/python-list

Re: XML Considered Harmful

2021-09-21 Thread alister via Python-list
On Tue, 21 Sep 2021 14:22:52 -0500, Michael F. Stemper wrote: > On 21/09/2021 13.49, alister wrote: >> On Tue, 21 Sep 2021 13:12:10 -0500, Michael F. Stemper wrote: >> >>> On the prolog thread, somebody posted a link to: >>> >>> >>> One thi

Re: XML Considered Harmful

2021-09-21 Thread Pete Forman
"Michael F. Stemper" writes: > On 21/09/2021 13.49, alister wrote: >> On Tue, 21 Sep 2021 13:12:10 -0500, Michael F. Stemper wrote: > It's my own research, so I can give myself the data in any format that I > like. > >> as far as I can see the main issue with XML is bloat, it tries to do >> too m

Re: XML Considered Harmful

2021-09-21 Thread Michael F. Stemper
On 21/09/2021 13.49, alister wrote: On Tue, 21 Sep 2021 13:12:10 -0500, Michael F. Stemper wrote: On the prolog thread, somebody posted a link to: One thing that it tangentially says is "XML is not the answer." I read this page right wh

Re: XML Considered Harmful

2021-09-21 Thread Joe Pfeiffer
Eli the Bearded <*@eli.users.panix.com> writes: > In comp.lang.python, Michael F. Stemper wrote: >> I've heard of JSON, but never done anything with it. > > You probably have used it inadvertantly on a regular basis over the > past few years. Websites live on it. If the user has any interaction

Re: XML Considered Harmful

2021-09-21 Thread alister via Python-list
On Tue, 21 Sep 2021 13:12:10 -0500, Michael F. Stemper wrote: > On the prolog thread, somebody posted a link to: > > > One thing that it tangentially says is "XML is not the answer." > > I read this page right when I was about to write an

XML Considered Harmful

2021-09-21 Thread Michael F. Stemper
On the prolog thread, somebody posted a link to: One thing that it tangentially says is "XML is not the answer." I read this page right when I was about to write an XML parser to get data into the code for a research project I'm working on

Re: XML Considered Harmful

2021-09-21 Thread Jon Ribbens via Python-list
On 2021-09-21, Michael F. Stemper wrote: > On the prolog thread, somebody posted a link to: > > > One thing that it tangentially says is "XML is not the answer." > > I read this page right when I was about to write an XML parser > to get data

Re: Polymorphic imports

2021-09-21 Thread Chris Angelico
On Wed, Sep 22, 2021 at 6:05 AM <2qdxy4rzwzuui...@potatochowder.com> wrote: > > On 2021-09-22 at 05:10:02 +1000, > Chris Angelico wrote: > > > You can dynamically import modules using importlib.import_module(), > > but an easier way might just be a conditional import: > > > > # client/__init__.py

Re: Polymorphic imports

2021-09-21 Thread 2QdxY4RzWzUUiLuE
On 2021-09-22 at 05:10:02 +1000, Chris Angelico wrote: > You can dynamically import modules using importlib.import_module(), > but an easier way might just be a conditional import: > > # client/__init__.py > if some_condition: > import module_a_default as module_a > else: > import module

Re: Polymorphic imports

2021-09-21 Thread Chris Angelico
On Wed, Sep 22, 2021 at 4:59 AM Travis Griggs wrote: > > I guess this is kind of like mocking for testing. I have a simple module > that's imported in a number of other spots in my program. There's a condition > in the OS/filesystem where I'd like to import a polymorphically compatible > varian

Polymorphic imports

2021-09-21 Thread Travis Griggs
I guess this is kind of like mocking for testing. I have a simple module that's imported in a number of other spots in my program. There's a condition in the OS/filesystem where I'd like to import a polymorphically compatible variant of the same module. Can this be accomplished in a sort of once

Re: Explaining exec(globals, separate_locals)

2021-09-21 Thread Dieter Maurer
Terry Reedy wrote at 2021-9-20 12:46 -0400: >The second paragraph of the current exec entry >https://docs.python.org/3.11/library/functions.html#exec >ends with a sentence I wrote. > >"If exec gets two separate objects as globals and locals, the code will >be executed as if it were embedded in a cl

Re: issue for setup pandas

2021-09-21 Thread Chris Angelico
On Tue, Sep 21, 2021 at 11:53 PM Fady Victor Mikhael Abdelmalk wrote: > > > Dear Python Team, > > I got the below issue when trying to install python on my user. Kindly assist > to know how can I solved. > > > WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, > status=Non

c extension finding the module in object initialization

2021-09-21 Thread Robin Becker
I have a c extension which is intended to implement a module the looks structurally like this a = 1 b = 2 class T: def __init__(self): self.a = a self.b = b so when an object of type T is instantiated it can set up defaults based on the current m

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

2021-09-21 Thread DFS
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,

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

2021-09-21 Thread Mohsen Owzar
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 dig

RE: issue for setup pandas

2021-09-21 Thread Fady Victor Mikhael Abdelmalk
Dear Python Team, I got the below issue when trying to install python on my user. Kindly assist to know how can I solved. WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new conne