From mk1853387 at gmail.com  Mon Dec  9 14:19:27 2024
From: mk1853387 at gmail.com (marc nicole)
Date: Mon, 9 Dec 2024 20:19:27 +0100
Subject: [Tutor] How to catch a fatal error in Python 2.7?
Message-ID: <CAGJtH9RSph6W6tMePZYdYPCEmgL22VoDLMjfGWdjq=H+6hMR7g@mail.gmail.com>

Hello,

The fatal error exits the program with a code -1 while referencing the
memory address involved and nothing else.

How to catch it in Python 2.7?

PS: please not I am not talking about exceptions but an error resulting
from the disconnection of my bluetooth microphone abruptly and leading to
the halting of the whole program, I need to be able to do something when it
occurs.

Thanks for the help!

From threesomequarks at proton.me  Tue Dec 10 14:28:28 2024
From: threesomequarks at proton.me (ThreeBlindQuarks)
Date: Tue, 10 Dec 2024 19:28:28 +0000
Subject: [Tutor] How to catch a fatal error in Python 2.7?
In-Reply-To: <CAGJtH9RSph6W6tMePZYdYPCEmgL22VoDLMjfGWdjq=H+6hMR7g@mail.gmail.com>
References: <CAGJtH9RSph6W6tMePZYdYPCEmgL22VoDLMjfGWdjq=H+6hMR7g@mail.gmail.com>
Message-ID: <rWEkdSpDQb32i-l_W3sxFze5ilKVjBdzVkuJfFmJnLBfVynLKz7fHlK2m7bDzJnru0NzQJN40DpbP8sMTGdNeEOLDRqi0CwBewXWdBtpogI=@proton.me>


Hard to answer something vague and especially for a largely abandoned version of python.

Even wrapping a function call in a try...catch may not work if a deeper level does not pass along an exception and something panics close to the hardware level.



Sent with Proton Mail secure email.

On Monday, December 9th, 2024 at 2:19 PM, marc nicole via Tutor <tutor at python.org> wrote:

> Hello,
> 
> The fatal error exits the program with a code -1 while referencing the
> memory address involved and nothing else.
> 
> How to catch it in Python 2.7?
> 
> PS: please not I am not talking about exceptions but an error resulting
> from the disconnection of my bluetooth microphone abruptly and leading to
> the halting of the whole program, I need to be able to do something when it
> occurs.
> 
> Thanks for the help!
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor

From george at fischhof.hu  Tue Dec 24 17:00:26 2024
From: george at fischhof.hu (George Fischhof)
Date: Tue, 24 Dec 2024 23:00:26 +0100
Subject: [Tutor] How to go about describing my software with a component
 diagram?
In-Reply-To: <CAGJtH9SihxgDSgYpVp1V7p-bKV1VM+WzG-bA2gR-_H14OWSTGw@mail.gmail.com>
References: <CAGJtH9SeSw6CJEgs37MQ9DJEADeQy4M_bAYPH1yeFiJN+mTLYQ@mail.gmail.com>
 <f5054d26-39ca-4bbb-8eb7-a8b0455c7966@DancesWithMice.info>
 <CAGJtH9TitodaW4uzrPg0omnEBzN=+FANLWYr+pdNu1MZAqeXvQ@mail.gmail.com>
 <CAGJtH9SihxgDSgYpVp1V7p-bKV1VM+WzG-bA2gR-_H14OWSTGw@mail.gmail.com>
Message-ID: <CAFwcP0i5_YOjkrSTK2HP5X8Zd4+4XDsMfsuL6FQVxJPsR4j-zw@mail.gmail.com>

marc nicole via Python-list <python-list at python.org> ezt ?rta (id?pont:
2024. dec. 24., K 22:09):

> The full python package (pypi) being represented as the outermost frame
> here including the 4 sub-frames)
>
> Le mar. 24 d?c. 2024 ? 22:05, marc nicole <mk1853387 at gmail.com> a ?crit :
>
> > I want to convey the idea that main.py (main algorithm) imports 3 modules
> > (V, S, M) (each of them containing .py scripts related to
> > different functionalities) and use their methods accordingly as per the
> > requirement: basically the structure of my code and how the modules
> relate
> > to each other.
> >
> > Le mar. 24 d?c. 2024 ? 21:56, dn via Python-list <python-list at python.org
> >
> > a ?crit :
> >
> >> On 25/12/24 06:27, marc nicole via Python-list wrote:
> >> > Hello community,
> >> >
> >> > I have created a Python code where a main algorithm uses three
> different
> >> > modules (.py) after importing them.
> >> >
> >> > To illustrate and describe it I have created the following component
> >> > diagram?
> >> >
> >> >
> >> > [image: checkso.PNG]
> >> >
> >> > Could it be improved for better description and readability?
> >>
> >>
> >> Possibly - so little detail as to topic and any hints in the diagram
> >> redacted! What messages do you want to communicate with this diagram?
> >>
> >> Given that the three modules are subordinate contributors to the
> >> script/algorithm, place the three modules inside a larger "Algorithm"
> >> shape.
> >>
> >> --
> >> Regards,
> >> =dn
> >> --
> >> https://mail.python.org/mailman/listinfo/python-list
> >>
> >
> --
> https://mail.python.org/mailman/listinfo/python-list



Hi,

also there are some tools which can generate class hierarchy diagram from
code.
for example here is a post
https://stackoverflow.com/questions/77421030/how-to-generate-the-uml-diagram-from-the-python-code

pyreverse is now part of pylint if I remember well.

BR
George

>
>

From mk1853387 at gmail.com  Tue Dec 24 12:27:21 2024
From: mk1853387 at gmail.com (marc nicole)
Date: Tue, 24 Dec 2024 18:27:21 +0100
Subject: [Tutor] How to go about describing my software with a component
 diagram?
Message-ID: <CAGJtH9SeSw6CJEgs37MQ9DJEADeQy4M_bAYPH1yeFiJN+mTLYQ@mail.gmail.com>

Hello community,

I have created a Python code where a main algorithm uses three different
modules (.py) after importing them.

To illustrate and describe it I have created the following component
diagram?


[image: checkso.PNG]

Could it be improved for better description and readability?


Thanks!

From mk1853387 at gmail.com  Tue Dec 24 15:42:23 2024
From: mk1853387 at gmail.com (marc nicole)
Date: Tue, 24 Dec 2024 21:42:23 +0100
Subject: [Tutor] How to go about describing my software with a component
 diagram?
In-Reply-To: <a7e5db71-ec6e-2625-a257-352303ff5e8a@gmail.com>
References: <CAGJtH9SeSw6CJEgs37MQ9DJEADeQy4M_bAYPH1yeFiJN+mTLYQ@mail.gmail.com>
 <CAGJtH9STnx2krCYs=6rEMNnc5kHNity-sWZiKWqbuMweRHejVA@mail.gmail.com>
 <a7e5db71-ec6e-2625-a257-352303ff5e8a@gmail.com>
Message-ID: <CAGJtH9QyXW64qnB2sSz8ZSp8x+dsyEH-_PvSmmTN1dR-wbPEQQ@mail.gmail.com>

it is here https://i.sstatic.net/ykk5Wd0w.png

Le mar. 24 d?c. 2024 ? 20:03, Michael Torrie via Python-list <
python-list at python.org> a ?crit :

> On 12/24/24 10:27 AM, marc nicole via Python-list wrote:
> > the diagram is also attached here
>
> This text-only mailing list does not allow attachments, just FYI.
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>

From mk1853387 at gmail.com  Tue Dec 24 16:05:35 2024
From: mk1853387 at gmail.com (marc nicole)
Date: Tue, 24 Dec 2024 22:05:35 +0100
Subject: [Tutor] How to go about describing my software with a component
 diagram?
In-Reply-To: <f5054d26-39ca-4bbb-8eb7-a8b0455c7966@DancesWithMice.info>
References: <CAGJtH9SeSw6CJEgs37MQ9DJEADeQy4M_bAYPH1yeFiJN+mTLYQ@mail.gmail.com>
 <f5054d26-39ca-4bbb-8eb7-a8b0455c7966@DancesWithMice.info>
Message-ID: <CAGJtH9TitodaW4uzrPg0omnEBzN=+FANLWYr+pdNu1MZAqeXvQ@mail.gmail.com>

I want to convey the idea that main.py (main algorithm) imports 3 modules
(V, S, M) (each of them containing .py scripts related to
different functionalities) and use their methods accordingly as per the
requirement: basically the structure of my code and how the modules relate
to each other.

Le mar. 24 d?c. 2024 ? 21:56, dn via Python-list <python-list at python.org> a
?crit :

> On 25/12/24 06:27, marc nicole via Python-list wrote:
> > Hello community,
> >
> > I have created a Python code where a main algorithm uses three different
> > modules (.py) after importing them.
> >
> > To illustrate and describe it I have created the following component
> > diagram?
> >
> >
> > [image: checkso.PNG]
> >
> > Could it be improved for better description and readability?
>
>
> Possibly - so little detail as to topic and any hints in the diagram
> redacted! What messages do you want to communicate with this diagram?
>
> Given that the three modules are subordinate contributors to the
> script/algorithm, place the three modules inside a larger "Algorithm"
> shape.
>
> --
> Regards,
> =dn
> --
> https://mail.python.org/mailman/listinfo/python-list
>

From mk1853387 at gmail.com  Tue Dec 24 16:08:42 2024
From: mk1853387 at gmail.com (marc nicole)
Date: Tue, 24 Dec 2024 22:08:42 +0100
Subject: [Tutor] How to go about describing my software with a component
 diagram?
In-Reply-To: <CAGJtH9TitodaW4uzrPg0omnEBzN=+FANLWYr+pdNu1MZAqeXvQ@mail.gmail.com>
References: <CAGJtH9SeSw6CJEgs37MQ9DJEADeQy4M_bAYPH1yeFiJN+mTLYQ@mail.gmail.com>
 <f5054d26-39ca-4bbb-8eb7-a8b0455c7966@DancesWithMice.info>
 <CAGJtH9TitodaW4uzrPg0omnEBzN=+FANLWYr+pdNu1MZAqeXvQ@mail.gmail.com>
Message-ID: <CAGJtH9SihxgDSgYpVp1V7p-bKV1VM+WzG-bA2gR-_H14OWSTGw@mail.gmail.com>

The full python package (pypi) being represented as the outermost frame
here including the 4 sub-frames)

Le mar. 24 d?c. 2024 ? 22:05, marc nicole <mk1853387 at gmail.com> a ?crit :

> I want to convey the idea that main.py (main algorithm) imports 3 modules
> (V, S, M) (each of them containing .py scripts related to
> different functionalities) and use their methods accordingly as per the
> requirement: basically the structure of my code and how the modules relate
> to each other.
>
> Le mar. 24 d?c. 2024 ? 21:56, dn via Python-list <python-list at python.org>
> a ?crit :
>
>> On 25/12/24 06:27, marc nicole via Python-list wrote:
>> > Hello community,
>> >
>> > I have created a Python code where a main algorithm uses three different
>> > modules (.py) after importing them.
>> >
>> > To illustrate and describe it I have created the following component
>> > diagram?
>> >
>> >
>> > [image: checkso.PNG]
>> >
>> > Could it be improved for better description and readability?
>>
>>
>> Possibly - so little detail as to topic and any hints in the diagram
>> redacted! What messages do you want to communicate with this diagram?
>>
>> Given that the three modules are subordinate contributors to the
>> script/algorithm, place the three modules inside a larger "Algorithm"
>> shape.
>>
>> --
>> Regards,
>> =dn
>> --
>> https://mail.python.org/mailman/listinfo/python-list
>>
>

From mk1853387 at gmail.com  Wed Dec 25 05:08:30 2024
From: mk1853387 at gmail.com (marc nicole)
Date: Wed, 25 Dec 2024 11:08:30 +0100
Subject: [Tutor] How to go about describing my software with a component
 diagram?
In-Reply-To: <0c3c9d66-39a2-491c-9e86-9c9cd6df814a@tompassin.net>
References: <CAGJtH9SeSw6CJEgs37MQ9DJEADeQy4M_bAYPH1yeFiJN+mTLYQ@mail.gmail.com>
 <CAGJtH9STnx2krCYs=6rEMNnc5kHNity-sWZiKWqbuMweRHejVA@mail.gmail.com>
 <a7e5db71-ec6e-2625-a257-352303ff5e8a@gmail.com>
 <CAGJtH9QyXW64qnB2sSz8ZSp8x+dsyEH-_PvSmmTN1dR-wbPEQQ@mail.gmail.com>
 <0c3c9d66-39a2-491c-9e86-9c9cd6df814a@tompassin.net>
Message-ID: <CAGJtH9QR8awV2fJuP9niU0MBRAg9snGshVBxv=ZSgJ7omi+UZw@mail.gmail.com>

the purpose of the diagram is to convey a minimalistic idea about the
structure of the code/implementation/software

Le mer. 25 d?c. 2024 ? 01:49, Thomas Passin via Python-list <
python-list at python.org> a ?crit :

> On 12/24/2024 3:42 PM, marc nicole via Python-list wrote:
> > it is here https://i.sstatic.net/ykk5Wd0w.png
>
> This diagram does not make much sense to me:
>
> 1. What is the purpose of the diagram and who is it intended for?
> 2. A module and an algorithm are different kinds of things, yet they are
> connected together as if they are the same.
> 3. Connecting lines should always be labeled, preferably with direction
> indicators that augment the labels.  Otherwise the viewer has to imagine
> what the nature of the connection is.
> 4. It's better if different kinds of things look different.  That could
> be a different box shape, a different color, or some other visual
> difference. Here I am thinking about the box labeled "Algorithm". We
> can't tell if it is intended to mean "A library module that implements a
> certain algorithm", "An algorithm that the three components cooperate to
> implement", "The top-level module for computing an algorithm that
> contains three modules", or something else.
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>

From alan.gauld at yahoo.co.uk  Thu Dec 26 07:20:43 2024
From: alan.gauld at yahoo.co.uk (Alan Gauld)
Date: Thu, 26 Dec 2024 12:20:43 +0000
Subject: [Tutor] How to go about describing my software with a component
 diagram?
In-Reply-To: <CAGJtH9TitodaW4uzrPg0omnEBzN=+FANLWYr+pdNu1MZAqeXvQ@mail.gmail.com>
References: <CAGJtH9SeSw6CJEgs37MQ9DJEADeQy4M_bAYPH1yeFiJN+mTLYQ@mail.gmail.com>
 <f5054d26-39ca-4bbb-8eb7-a8b0455c7966@DancesWithMice.info>
 <CAGJtH9TitodaW4uzrPg0omnEBzN=+FANLWYr+pdNu1MZAqeXvQ@mail.gmail.com>
Message-ID: <vkjhms$an5$1@ciao.gmane.io>

On 24/12/2024 21:05, marc nicole via Python-list wrote:
> I want to convey the idea that main.py (main algorithm) imports 3 modules
> (V, S, M) (each of them containing .py scripts related to
> different functionalities) and use their methods accordingly as per the
> requirement: basically the structure of my code and how the modules relate
> to each other.

Assuming you are thinking about UML notation a component diagram
is probably the wrong tool. Components are normally used for
physical entities - source files, libraries, executables etc.
You probably want to use a package diagram to express the
logical connection between modules and algorithms(ie functions?)
This allows you to show which modules contain which algorithms
and which modules use other modules etc.

Trying to mix physical and logical entities within a single
diagram will just lead to confusion.

If it really is the physical architecture you want to show,
you can represent your algorithm interfaces using "lollipop"
notation on the containing component. This is mainly useful
where multiple components depend on a common component, say,
but each dependency uses different interfaces (COM v Web
service v Socket etc).

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos