Re: WHAT THIS EXCEPTION MEANT? I ATTCHED SCREENSOHT

2022-09-09 Thread Mats Wichmann

On 9/8/22 06:34, נתי שטרן wrote:

[image: image.png]



The mailing list strips attachments, replacing them by a placeholder as 
you see above.


If you want to try again, please paste the text of the exception.
--
https://mail.python.org/mailman/listinfo/python-list


RE: WHAT THIS EXCEPTION MEANT? I ATTCHED SCREENSOHT

2022-09-09 Thread avi.e.gross
Nati,

If you thought a bit first, you might remember this mailing list does not
forward attachments so we are not seeing the image you called image.png and
you neglected to also give us some text telling us what exception you saw or
lots of additional details that might help.

And, just FYI. Using upper case subjects with multiple spelling and grammar
errors is not an ideal way to get anyone to want to read or reply. Yes, I
realize your main language is  עִברִית but you are writing to an
international audience where everyone expects some English.

Try this next time:

Subject: What does this exception mean? I attached a screenshot
([{that nobody can see]})

All uppercase is considered shouting by some unless it merits it.


It is possible that the screenshot might have told us what was needed but
generally people need to know what kind of Python you are running on what
kind of machine/OS and what modules you imported that may be relevant and
see what code may have been called that passed back the exception without
handling it.

You have posted here before many times and probably also know some of us
want to know a bit about the purpose of the code as the answer often is not
to do it that way and do something a bit different but that is valid in the
circumstances.

Avi



-Original Message-
From: Python-list  On
Behalf Of ??? 
Sent: Thursday, September 8, 2022 8:34 AM
To: python-list@python.org
Subject: WHAT THIS EXCEPTION MEANT? I ATTCHED SCREENSOHT

[image: image.png]

-- 

-- 
https://mail.python.org/mailman/listinfo/python-list

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Question about learning Python

2022-09-09 Thread Chris Angelico
On Sat, 10 Sept 2022 at 06:45, Dennis Lee Bieber  wrote:
>
> On Thu, 8 Sep 2022 07:42:19 +1200, dn 
> declaimed the following:
>
> >TSRs? Now that was an ugly period of history! (trying to make a
> >single-process operating system do multi-processing - only to find that
> >many program[me]s assumed they had full use and undisputed control of
> >the computer. Happy days...)
> >
>
> I laughed when M$ MSDOS (2?) introduced TSRs... My TRS-80 running
> L(S)DOS had similar things at least a year earlier. And these were
> /run-time/ loadable. They called them "filters" (and device drivers were
> also an option). Key-click was one such -- though it also showed some
> quirks (like... If the processor was really busy, the key-board driver
> would buffer key-strokes, but the filter activated when an application
> /read/ the key-board). Filter to control printer formatting, a JobLog
> filter, Key-Stroke Multiply filter (I never used it, but it apparently uses
> a table of special keys and expands them to longer strings). Commands to
> load device drivers (or remove them!). Could even change the number of
> cylinders for a floppy drive -- My drives were "loose" enough to allow my
> to add 2 cylinders.
>

To be fair on MS-DOS, you didn't *have* to use a TSR to hook
interrupts, and the same idea of those filters would work (just hook
the keyboard interrupt in a cooperative way; last installed is first
executed). But the OS offered only one option for a program to run and
put itself somewhere: "terminate process and increase the base segment
address for subsequent processes", which would allow you to leave any
amount of memory (on a sixteen-byte boundary) active.

There's no reason that filters couldn't have been written that blit
themselves into some other part of memory, point some interrupt
vectors there, and then fully terminate. Sure, the OS wouldn't have
offered any protection, but the OS didn't offer any actual protection
anyway. All we'd need is a spare slab of memory for things to put
their code into, one which everyone could allocate and deallocate
from. oh. Yeah, like virtual memory.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Question about learning Python

2022-09-09 Thread Chris Angelico
On Sat, 10 Sept 2022 at 06:38, Greg Ewing  wrote:
>
> On 8/09/22 6:57 am, Chris Angelico wrote:
> > Not as detrimental as starting with BASIC, and then moving on to x86
> > assembly language, and trying to massage the two together using CALL
> > ABSOLUTE in order to get mouse input in your GW-BASIC programs.
>
> Or starting with hand-assembled SC/MP machine code and then moving
> on to Applesoft BASIC.
>

I have no idea how we survived.

Though, "survived with our sanity intact" clearly didn't happen, so
perhaps there's that.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Question about learning Python

2022-09-09 Thread Dennis Lee Bieber
On Thu, 8 Sep 2022 07:42:19 +1200, dn 
declaimed the following:

>TSRs? Now that was an ugly period of history! (trying to make a
>single-process operating system do multi-processing - only to find that
>many program[me]s assumed they had full use and undisputed control of
>the computer. Happy days...)
>

I laughed when M$ MSDOS (2?) introduced TSRs... My TRS-80 running
L(S)DOS had similar things at least a year earlier. And these were
/run-time/ loadable. They called them "filters" (and device drivers were
also an option). Key-click was one such -- though it also showed some
quirks (like... If the processor was really busy, the key-board driver
would buffer key-strokes, but the filter activated when an application
/read/ the key-board). Filter to control printer formatting, a JobLog
filter, Key-Stroke Multiply filter (I never used it, but it apparently uses
a table of special keys and expands them to longer strings). Commands to
load device drivers (or remove them!). Could even change the number of
cylinders for a floppy drive -- My drives were "loose" enough to allow my
to add 2 cylinders.

>On the other hand, one can start too 'high' or too 'modern'. Like the
>person enthusing about MSFT's and AWS' programming AIs, thinking that
>such tools will replace programmers (one of the aims of the COBOL
>language back in the 1960s). His short-form description spoke volumes:
>'it saves anyone from having to look-up Stack Overflow any more' - a
>'blind' cut-and-paste prospect that saves the 'author' from the
>difficulties of 'learning stuff'; until it is time to, um, learn-stuff -
>to know why one needs to learn-stuff BEFORE taking from SO/AI.

I once worked with someone whose idea of programming was to find
examples of working code, and cut snippets to make an application. We
needed to control four devices via GPIB... She wrote four short programs
and a DCL script to run them in sequence.

Problem: each program had to issue a GPIB initialization command before
it could continue to talk to any device. But each initialization command
would UNDO any configuration the previous program had set up! We discovered
THAT when TDY to the remote site (and she'd already returned home). I had
to debug the situation, and rewrite the four programs into a single
consolidate program over a weekend (and I'd never worked with GPIB before
this -- my task was the post processing of the data that was collected
after the GPIB chain had been set up for data collection).

I think I'm not giving away any secrets these days, but this was a
Quick Response Contract for a proof of concept -- that a geo-bird could
catch over the horizon GPS signals, and thereby improve the satellite
tracking data for ephemeris generation. Had to be over-the-horizon as
geo-birds are above GPS, and GPS aims signals down to earth. We had to
catch side-lobes as GPS birds were high enough to avoid
ionosphere/troposphere effects.



-- 
Wulfraed Dennis Lee Bieber AF6VN
wlfr...@ix.netcom.comhttp://wlfraed.microdiversity.freeddns.org/
-- 
https://mail.python.org/mailman/listinfo/python-list


WHAT THIS EXCEPTION MEANT? I ATTCHED SCREENSOHT

2022-09-09 Thread נתי שטרן
[image: image.png]

-- 

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Question about learning Python

2022-09-09 Thread Meredith Montgomery
 writes:

> Maybe we should ask WHY the person asking the question about how to learn a
> computer language called Python is pairing it with the idea of whether to
> also learn C.

Excellent point!
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Question about learning Python

2022-09-09 Thread Greg Ewing

On 8/09/22 6:57 am, Chris Angelico wrote:

Not as detrimental as starting with BASIC, and then moving on to x86
assembly language, and trying to massage the two together using CALL
ABSOLUTE in order to get mouse input in your GW-BASIC programs.


Or starting with hand-assembled SC/MP machine code and then moving
on to Applesoft BASIC.

--
Greg

--
https://mail.python.org/mailman/listinfo/python-list


Re: any author you find very good has written a book on Python?

2022-09-09 Thread Fulian Wang
Python is an appropriate computer language for kids and teenagers. A very good 
book for beginners: Invent Your Own computer games with Python
Author: Al Sweigart
It's free online, but it's worth to have one.

Get Outlook for iOS

From: Python-list  on 
behalf of Tim Daneliuk via Python-list 
Sent: Wednesday, September 7, 2022 12:39:25 PM
To: python-list@python.org 
Subject: Re: any author you find very good has written a book on Python?

On 9/5/22 21:22, Meredith Montgomery wrote:
> I never read a book on Python.  I'm looking for a good one now.  I just
> searched the web for names such as Charles Petzold, but it looks like he
> never wrote a book on Python.  I also searched for Peter Seibel, but he
> also never did.  I also tried to search for Richard Heathfield.  (I took
> a look at his ``C Unleashed'' once and I liked what I saw.)  This is how
> I search for books --- I go through the authors first.  Charles Petzold,
> for instance, anything he writes is worth reading it.  (Have you given
> his Annotated Turing a shot?  It's a very nice read.)
>
> So that's my request --- any author you find very good has written a
> book on Python?
>
> It could be for in a certain specific context.  For instance, I also
> searched for Hadley Wickham in the hope that he could have written a
> data-science-type of book using Python.  I like his writing a lot, but
> he also only seems to have written only for the R language.
>
> Thank you!

David Beazley

--
https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


Question about learning Python

2022-09-09 Thread Fulian Wang
Python is an appropriate computer language for kids and teenagers. A very good 
book for beginners: Invent Your Own computer games with Python
Author: Al Sweigart
It's free online, but it's worth to have one.

Get Outlook for iOS

From: Python-list  on 
behalf of avi.e.gr...@gmail.com 
Sent: Wednesday, September 7, 2022 7:32:11 PM
To: python-list@python.org 
Subject: RE: Question about learning Python

Chris,

I started with BASIC in high school and kept shifting my focus from one
computer language to another long before I even looked at Python.

Arguably each language had a REASON for existing so it supported some ideas
or paradigms or ways of looking at things. Many at first were rather focused
on doing one or a few things well, and others not so well or not at all. No
need to rehash it.

In a sense, many modern languages can be viewed as containing multiple
overlapping modules which collectively do all kinds of things in many ways
and can do whatever many earlier initial releases of earlier languages did,
sometimes better but also sometimes slower. If you look at Python as a base
and added modules, it can do all the mathematical things of say FORTRAN,
manipulate text and produce reports and on and on. But it also can NOT do
things done in basic, or at least not easily, like subroutines and goto's
that are associated with a more primitive way to solve problems.

Is there any purpose in teaching new students how to structure your code so
that you use such methods? Well, maybe. I mean we have all kinds of slightly
hidden ways to do a GOTO in some languages such as breaking out of a nested
loop. Underneath it all, an IF/THEN/ELSE type of statement has regions you
jump between. But arguably it is helpful to see operations on a higher level
and leave the details of how it is accomplished in well tested code within
the interpreter or compiler.

C was designed on purpose to do some things that a language like PASCAL was
designed not to allow or make easy. Both started off though as fairly simple
languages that did things somewhat linearly. You can obviously emulate many
things using a simplified subset of Python that would allow programs in
those languages to be done. If that is all you want to learn, fine. But if
your goal is to make use of OO and functional programming and other
paradigms supported, ...

As I posted elsewhere, I ask why the questioner specifically mentioned C. I
also use R and there too, C is only needed if you want to speed up some
function by writing parts in their version of C or C++. The fact that many
interpreters are written (or sometimes were written) in C is not really
relevant.


-Original Message-
From: Python-list  On
Behalf Of Chris Angelico
Sent: Wednesday, September 7, 2022 2:58 PM
To: python-list@python.org
Subject: Re: Question about learning Python

On Thu, 8 Sept 2022 at 04:54, Grant Edwards 
wrote:
>
> On 2022-09-07, Chris Angelico  wrote:
> > On Thu, 8 Sept 2022 at 01:50, Maruful Islam 
wrote:
> >>
> >> I want to start learning python. I have a question about learning
python.
> >>
> >> Is learning C essential or not for learning python?
> >
> > Absolutely not essential. In fact, I would strongly recommend
> > learning Python before ever picking up C, as it's much easier to
> > mess around in Python.
>
> If you're a beginning programmer, then IMO learning C first is
> probably detrimental. C has quite a few quirks and pitfalls that will
> a) frustrate you and waste time, and b) influence your way of thinking
> about programs in a way that will be unhelpful for higher level
> languages.

Not as detrimental as starting with BASIC, and then moving on to x86
assembly language, and trying to massage the two together using CALL
ABSOLUTE in order to get mouse input in your GW-BASIC programs.

Don't be me, folks.

ChrisA
--
https://mail.python.org/mailman/listinfo/python-list

--
https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


Fwd:

2022-09-09 Thread Jan Poort
error by starting up windows 10 i get this message


-- Forwarded message -
Van: Jan Poort 
Date: do 8 sep. 2022 om 15:49
Subject:
To: 




-- 
*Jan Poort*
-- 
https://mail.python.org/mailman/listinfo/python-list


[Python-announce] NumPy 1.23. 3 Release

2022-09-09 Thread Charles R Harris
Hi All,

On behalf of the NumPy team, I am pleased to announce the release of
NumPy 1.23.3. NumPy 1.23.3 is a maintenance release that fixes bugs
discovered after the 1.23.2 release. There is no major theme for this
release, the main improvements are for some downstream builds and some
annotation corner cases. The Python versions supported for this release are
3.8-3.11. Wheels can be downloaded from PyPI
; source archives, release notes,
and wheel hashes are available on Github
.

Note that we will move to MacOS 11 for the NumPy 1.23.4 release, the 10.15
version currently used will no longer be supported by our build
infrastructure at that point.

*Contributors*

A total of 16 people contributed to this release.  People with a "+" by
their
names contributed a patch for the first time.

   - Aaron Meurer
   - Bas van Beek
   - Charles Harris
   - Ganesh Kathiresan
   - Gavin Zhang +
   - Iantra Solari+
   - Jyn Spring 琴春 +
   - Matti Picus
   - Rafael Cardoso Fernandes Sousa
   - Rafael Sousa +
   - Ralf Gommers
   - Rin Cat (鈴猫) +
   - Saransh Chopra +
   - Sayed Adel
   - Sebastian Berg
   - Serge Guelton



*Pull requests merged*
A total of 14 pull requests were merged for this release.

   - #22136: BLD: Add Python 3.11 wheels to aarch64 build
   - #22148: MAINT: Update setup.py for Python 3.11.
   - #22155: CI: Test NumPy build against old versions of GCC(6, 7, 8)
   - #22156: MAINT: support IBM i system
   - #22195: BUG: Fix circleci build
   - #22214: BUG: Expose heapsort algorithms in a shared header
   - #22215: BUG: Support using libunwind for backtrack
   - #22216: MAINT: fix an incorrect pointer type usage in f2py
   - #0: BUG: change overloads to play nice with pyright.
   - #1: TST,BUG: Use fork context to fix MacOS savez test
   - #2: TYP,BUG: Reduce argument validation in C-based
   ``__class_getitem__``
   - #3: TST: ensure ``np.equal.reduce`` raises a ``TypeError``
   - #4: BUG: Fix the implementation of numpy.array_api.vecdot
   - #22230: BUG: Better report integer division overflow (backport)


Cheers,

Charles Harris
___
Python-announce-list mailing list -- python-announce-list@python.org
To unsubscribe send an email to python-announce-list-le...@python.org
https://mail.python.org/mailman3/lists/python-announce-list.python.org/
Member address: arch...@mail-archive.com


[Python-announce] perftester: A framework for performance testing of Python functions

2022-09-09 Thread Marcin Kozak
The perftester package enables you to run performance tests of Python
functions/callables. Performance is understood in terms of both execution
time and memory usage. In addition, perftester enables you to run
benchmarks, an important functionality when you need to set limits for your
tests.

You have time_test(), time_benchmark(), memory_usage_test() and
memory_usage_benchmark() functions. In addition, the package offers a pp()
function, for pretty printing of the benchmarking results. Time
benchmarking and testing is based on timeit.repeat() function while memory
benchmarking and testing is based on memory_profiler.memory_usage()
function. The idea behind the package is to offer performance testing using
a simple API, so the functions' APIs are simple and intuitive.

You can run performance testing using perftester in two ways:
* by adding perftester functions to your pytests (or doctests); it's a
simple approach but makes units tests run much longer and the unit tests
are mixed up with performance tests
* by running perftester as a separate testing framework, using a
command-line interface; even if not that simple, this approach is still
quite simple, as you gather performance tests in dedicated files (starting
off with "perftester_" prefix (so, "perftester*.py")

In the latter case, you can also change the default settings in a dedicated
Python module. You can change settings also in other ways, using a config
object. But often, you do not need to do that, as you can do most of what
you need using the above function's APIs.

While perftester is lightweight, at the same time it offers various
functionalities. Hence, especially when deciding to use it as a testing
framework (and not part of pytests), one should spend some time on reading
the documentation. You will find it in the GitHub repository:
https://github.com/nyggus/perftester.

You can install perftester from PyPi (https://pypi.org/project/perftester/):
$ python -m pip install perftester

While there are various ways to benchmark and profile Python code,
perftester is, as far as I know, the first Python framework for performance
testing (not just benchmarking) of Python functions. If you know such a
tool, however, please let me know.

If you like perftester, please consider leaving a star in the repository.

So, happy perftesting!
Marcin
___
Python-announce-list mailing list -- python-announce-list@python.org
To unsubscribe send an email to python-announce-list-le...@python.org
https://mail.python.org/mailman3/lists/python-announce-list.python.org/
Member address: arch...@mail-archive.com