Re: [Python-Dev] Small lament...

2023-04-03 Thread dn via Python-list

On 04/04/2023 12.14, Guido van Rossum wrote:

A bit late, this reached my inbox:
https://peternorvig.medium.com/new-python-operators-9f31b56ddcc7


Did you notice that Peter Norvig's factorial-operator attempts to 
replace one of the very first diamond-grade provisions of [the] FLUFL?


Disgraceful behavior! So disrespectful!

Send him to the Spanish Inquisition...


Saying that, he (Peter) lost the opportunity to promote our new 
dev.movement. As he pointed-out, tests are likely to give one a false 
sense of security with regard to the correctness of code.


Accordingly, join us in the noTDD philosophy. Like NoSQL is schema-less, 
noTDD is scheme-less (we have NO idea what we're doing).


Don't be led-astray by tests. We're all [adult-]optimists here...



On Sat, Apr 1, 2023 at 11:23 AM Skip Montanaro 
wrote:


Just wanted to throw this out there... I lament the loss of waking up on
April 1st to see a creative April Fool's Day joke on one or both of these
lists, often from our FLUFL... Maybe such frivolity still happens, just not in
the Python ecosystem? I know you can still import "this" or
"antigravity", but those are now old (both introduced before 2010). When
was the last time a clever easter egg was introduced or an April Fool's Day
joke played?

¯\_(ツ)_/¯

Skip

___
Python-Dev mailing list -- python-...@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at
https://mail.python.org/archives/list/python-...@python.org/message/Q62W2Q6R6XMX57WK2CUGEENHMT3C3REF/
Code of Conduct: http://python.org/psf/codeofconduct/






--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list


Re: problems in using libraries

2023-04-03 Thread Thomas Passin

On 4/3/2023 1:25 PM, pranavbhardwaj...@gmail.com wrote:
 

 


Sent from [1]Mail for Windows

Why can't I able to use python libraries in my python 3.11.2. It always
throw an error such as

and

and many more.

I installed python from python official website and I installed libraries
using cmd prompt by typing- pip install “Library name”
You have not done what I suggested that you do in my last post.  As I 
recall from earlier messages, you have several versions of Python 
installed.  You have to be sure that when you run "pip" it is being run 
by the version of Python that you want.  I asked you to check that and 
gave you examples of how.


So please do that.

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


RE: [Python-Dev] Small lament...

2023-04-03 Thread avi.e.gross
Sadly, between Daylight Savings time and a  newer irrational PI π Day, I am 
afraid some April Foolers got thrown off albeit some may shower us with 
nonsense  in May I.

-Original Message-
From: Python-list  On 
Behalf Of Barry Warsaw
Sent: Monday, April 3, 2023 8:31 PM
To: Skip Montanaro 
Cc: Python ; Python Dev 
Subject: Re: [Python-Dev] Small lament...

I heard it on reasonably believable authority that the FLUFL took the year off. 
 Lamentable.

-Barry

> On Apr 1, 2023, at 11:19, Skip Montanaro  wrote:
> 
> Just wanted to throw this out there... I lament the loss of waking up on 
> April 1st to see a creative April Fool's Day joke on one or both of these 
> lists, often from our FLUFL... Maybe such frivolity still happens, just not 
> in the Python ecosystem? I know you can still import "this" or "antigravity", 
> but those are now old (both introduced before 2010). When was the last time a 
> clever easter egg was introduced or an April Fool's Day joke played?
> 
> ¯\_(ツ)_/¯
> 
> Skip
> 
> ___
> Python-Dev mailing list -- python-...@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at 
> https://mail.python.org/archives/list/python-...@python.org/message/Q62W2Q6R6XMX57WK2CUGEENHMT3C3REF/
> Code of Conduct: http://python.org/psf/codeofconduct/


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


Re: [Python-Dev] Small lament...

2023-04-03 Thread Barry Warsaw
I heard it on reasonably believable authority that the FLUFL took the year off. 
 Lamentable.

-Barry

> On Apr 1, 2023, at 11:19, Skip Montanaro  wrote:
> 
> Just wanted to throw this out there... I lament the loss of waking up on 
> April 1st to see a creative April Fool's Day joke on one or both of these 
> lists, often from our FLUFL... Maybe such frivolity still happens, just not 
> in the Python ecosystem? I know you can still import "this" or "antigravity", 
> but those are now old (both introduced before 2010). When was the last time a 
> clever easter egg was introduced or an April Fool's Day joke played?
> 
> ¯\_(ツ)_/¯
> 
> Skip
> 
> ___
> Python-Dev mailing list -- python-...@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at 
> https://mail.python.org/archives/list/python-...@python.org/message/Q62W2Q6R6XMX57WK2CUGEENHMT3C3REF/
> Code of Conduct: http://python.org/psf/codeofconduct/



signature.asc
Description: Message signed with OpenPGP
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [Python-Dev] Small lament...

2023-04-03 Thread Guido van Rossum
A bit late, this reached my inbox:
https://peternorvig.medium.com/new-python-operators-9f31b56ddcc7

On Sat, Apr 1, 2023 at 11:23 AM Skip Montanaro 
wrote:

> Just wanted to throw this out there... I lament the loss of waking up on
> April 1st to see a creative April Fool's Day joke on one or both of these
> lists, often from our FLUFL... Maybe such frivolity still happens, just not in
> the Python ecosystem? I know you can still import "this" or
> "antigravity", but those are now old (both introduced before 2010). When
> was the last time a clever easter egg was introduced or an April Fool's Day
> joke played?
>
> ¯\_(ツ)_/¯
>
> Skip
>
> ___
> Python-Dev mailing list -- python-...@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-...@python.org/message/Q62W2Q6R6XMX57WK2CUGEENHMT3C3REF/
> Code of Conduct: http://python.org/psf/codeofconduct/
>


-- 
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him **(why is my pronoun here?)*

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


problems in using libraries

2023-04-03 Thread pranavbhardwaj773
    

    

   Sent from [1]Mail for Windows

   Why can't I able to use python libraries in my python 3.11.2. It always
   throw an error such as  

   and

   and many more.

   I installed python from python official website and I installed libraries
   using cmd prompt by typing- pip install “Library name”

References

   Visible links
   1. https://go.microsoft.com/fwlink/?LinkId=550986
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: built-in pow() vs. math.pow()

2023-04-03 Thread 2QdxY4RzWzUUiLuE
On 2023-04-01 at 08:16:46 -0700,
Andreas Eisele  wrote:

> BTW, there is another difference: built-in pow() deals with complex
> arguments, while functions in math won't accept them at all.

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


Re: Windows Gui Frontend

2023-04-03 Thread rbowman
On Sun, 2 Apr 2023 19:52:05 +0200, Dietmar Schwertberger wrote:

> On 02.04.2023 18:20, Michael Torrie wrote:
>>> Well the thing is you don't need to generate Python code at all.  Qt
>>> provides a UI loader class that loads the UI file at run time, builds
>>> the objects in memory, and connects all your signals for you.
> 
> I know, but having to load the .ui file is awkward.
> Even worse, you lose things like code completion.

One advantage is customization. It's not Python but we use a GUI system 
that supports uids. The underlying data is the same but some clients may 
not want certain fields or want them labeled or arranged differently. 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Problem in using libraries

2023-04-03 Thread Thomas Passin

On 4/3/2023 12:43 PM, Pranav Bhardwaj wrote:

Why can't I able to use python libraries such as numpy, nudenet, playsound,
pandas, etc in my python 3.11.2. It always through the error "import
'numpy' or any other libraries could not be resolved".


You need to realize that no one can help you without some specific 
information.  You have not told us anything.  You might as well have 
said, if your car didn't start, "My car won't run.  Why can't I start it?.


Let's start with the most obvious thing - are those libraries installed? 
 If not, install them.  If you think they have been installed, then 
tell us how you installed them and how you know they have been 
successfully installed *for the version of python* you are trying to use.


Let's take numpy. The standard way to install it is using pip.  You have 
to make sure that you run the pip program that goes with the version of 
Python you plan to use.  I'm going to assume that if you type "py" 
(without quotes), you will get that version.  If not, use the command 
you have been using to run Python 3.11.


On my system:

C:\Users\tom>py -V
Python 3.10.9

C:\Users\tom>py -m pip show numpy
Name: numpy
Version: 1.23.4
Summary: NumPy is the fundamental package for array computing with Python.
Home-page: https://www.numpy.org
Author: Travis E. Oliphant et al.
Author-email:
License: BSD
Location: 
c:\users\tom\appdata\local\programs\python\python310\lib\site-packages

Requires:
Required-by: bokeh, causal-curve, cftime, contourpy, csaps, dcor, emd, 
frechetdist, imageio, localreg, matplotlib, mizani, netCDF4, numba, 
pandas, patsy, plotnine, pwlf, pyDOE, pygam, PyWavelets, scaleogram, 
scikit-image, scikit-learn, scipy, seaborn, sparse, statsforecast, 
statsmodels, tifffile


If a library is not installed (I'll use a non-existent library name) -

C:\Users\tom>py -m pip show numpyx
WARNING: Package(s) not found: numpyx

To install numpy with pip *for that version of Python* -

py -m pip install numpy   (or a form you may see sometimes: py -m 
install --user numpy)


Please reply with this information.
--
https://mail.python.org/mailman/listinfo/python-list


Re: Python file location

2023-04-03 Thread windhorn
Thanks to all for suggestions.  Linux has "too much freedom" :-)

Regards,
Allen
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Windows Gui Frontend

2023-04-03 Thread rbowman
On Sun, 02 Apr 2023 13:50:45 -0700 (PDT), Grant Edwards wrote:

> On 2023-04-02, Michael Torrie  wrote:
>> On 4/2/23 05:09, Dietmar Schwertberger wrote:
>>> I also did evaluate all the GUI builder from time to time between 2000
>>> and 2016 to find one that I could recommend to colleagues, but could
>>> not find one. Then I started contributing to wxGlade and I can say
>>> that since a few years it's as easy again to build GUIs as it was with
>>> VB6.
>>
>> [...]
>>
>> But any modern GUI toolkit has sizers and layout managers. If you're
>> manually placing elements you cannot deal with HiDPI or changing window
>> sizes.
> 
> Ah, that's the brilliant thing about VB6 apps! They only work properly
> on machines with the same resoultion and display/font configuration as
> the developer.

VB6 isn't the only thing that goes to hell in a hand basket when you start 
playing around with fonts and resolutions. If I were emperor of the world 
there would only be monospaced fonts and a limited selection of those.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Windows Gui Frontend

2023-04-03 Thread rbowman
On Sat, 1 Apr 2023 19:19:17 -0600, Michael Torrie wrote:


> Qt's commerical licensing is very hostile to small companies, I can say
> that much.  It's too bad really.  But the LGPL will work for most
> companies, except for those that might wish to use the embedded version,
> such as in cars where being able to abide by the terms of the LGPL
> becomes difficult.

Even when the trolls had it the arcane requirements for commercial 
licensing drove many away. I sometimes think 'Side' is actually Finnish 
for 'up yours, Riverbank Computing'. 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Windows Gui Frontend

2023-04-03 Thread Jach Feng
Jim Schwartz 在 2023年4月1日 星期六晚上8:00:19 [UTC+8] 的信中寫道:
> I have another question. I have an app written in python, but I want to add 
> a windows GUI front end to it. Can this be done in python? What packages 
> would allow me to do that? 
> 
> 
> 
> Thanks.
There is a GUI Generator for tkinter
https://page.sourceforge.net/

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


Hurry up! Book your spot for the DIPY Workshop in LA! April 24-28 2023!!

2023-04-03 Thread Eleftherios Garyfallidis
Dear all,

Only a few spots are left. Register now: https://dipy.org/workshops/latest
 !!!

The complete program for the highly anticipated workshop is updated and
available in the link above.


DIPY is a powerful software library for analyzing and processing diffusion
MRI data. It is an open-source project with a large and active
community of contributors who are dedicated to advancing the field of
medical imaging. The DIPY workshop provides an excellent opportunity
for individuals to learn how to use this software effectively. The workshop
covers a broad range of topics, from basic concepts to advanced
techniques, and provides hands-on experience with the software. By
attending the DIPY workshop, you will not only learn how to use this
powerful tool, but also gain a deeper understanding of diffusion imaging
and machine learning for imaging in general. The workshop is led by
expert instructors who have extensive experience in both diffusion imaging
and DIPY, so attendees can be confident that they are receiving
accurate and up-to-date information.



[image: image.png]



In summary, the workshop offers:


   -

   Hands-on tutorials - Every single day of the 5 days !!!
   -

   Guided practice sessions (bring your data - optional)
   -

   Personalized certificates of attendance
   -

   Effective networking opportunities with one-to-one follow ups
   -

   Comprehensive explanation of theoretical foundations with practical
   examples
   -

   Access to latest and established methods with code and interfaces
   -

   Pointers to move beyond the current challenges and navigate hard to do
   analyses
   -

   Multiple clinical use cases (AZ, Parkinson’s etc.)





See above one of the many highlights of the workshop. Building synthetic
b0s (with Synb0) in DIPY 1.7.0!  More highlights here
.

Please allow us to finish this email with a testimonial from one of our
last in person workshops:

This one is from an expert neuropsychologist:

“In recent years, I've found that many scientific conferences have become
plagued with pitfalls such as repetitive content, superficial networking,
and a focus

on self-promotion rather than genuine knowledge exchange. Attendees often
leave these events with a sense of disillusionment, feeling that their time
could

have been better spent elsewhere. The DIPY workshop, however, was a breath
of fresh air in this sea of mediocrity. It was highly interactive,
engaging, and

hands-on, with a genuine emphasis on learning and collaboration. The
organizers went above and beyond to create a welcoming and supportive
environment,

encouraging researchers of all backgrounds and expertise levels to
contribute their ideas and gain valuable insights. By addressing the
shortcomings of

traditional conferences, the DIPY workshop has rekindled my enthusiasm for
scientific events and has set a new standard for what a truly productive
and

inspiring gathering should be.”

We kept our promise! Get your tickets!

See you in the workshop!

Eleftherios Garyfallidis, PhD

Associate Professor

Intelligent Systems Engineering

Indiana University

Luddy Hall 700 N Woodlawn

Bloomington, IN 47408

DIPY  | FURY 
-- 
https://mail.python.org/mailman/listinfo/python-list


Small lament...

2023-04-03 Thread Skip Montanaro
Just wanted to throw this out there... I lament the loss of waking up on
April 1st to see a creative April Fool's Day joke on one or both of these
lists, often from our FLUFL... Maybe such frivolity still happens, just not in
the Python ecosystem? I know you can still import "this" or "antigravity",
but those are now old (both introduced before 2010). When was the last time
a clever easter egg was introduced or an April Fool's Day joke played?

¯\_(ツ)_/¯

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


Re: built-in pow() vs. math.pow()

2023-04-03 Thread Andreas Eisele
Andreas Eisele schrieb am Donnerstag, 30. März 2023 um 11:16:02 UTC+2:
> I sometimes make use of the fact that the built-in pow() function has an 
> optional third argument for modulo calculation, which is handy when dealing 
> with tasks from number theory, very large numbers, problems from Project 
> Euler, etc. I was unpleasantly surprised that math.pow() does not have this 
> feature, hence "from math import *" overwrites the built-in pow() function 
> with a function that lacks functionality. I am wondering for the rationale of 
> this. Does math.pow() do anything that the built-in version can not do, and 
> if not, why is it even there? 
> Thanks in advance for any enlightening comment on this. 
> Best regards, Andreas

Thanks a lot to all of you for the insightful replies! 
I now understand why math.pow() behaves the way it does and whoever tells me I 
should have read the doc of the math module before using it is 100% on point. 
BTW, there is another difference: built-in pow() deals with complex arguments, 
while functions in math won't accept them at all.
I also agree with the warning that importing * from any module is generally a 
bad idea, and I normally would not do it.  But here I had written a little tool 
that evaluates an expression given on the command line, and in this case having 
math functions available without further ado is very convenient, so it seemed 
appropriate to make an exeption to this rule.
I ended up assigning the built-in pow function to a different name before 
importing the math module, which is a good way to keep both variants accessible.
Best regards, and thanks again, Andreas
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python 3.9 asyncio: Task cancel() throws asyncio.exceptions.CancelledError instead of asyncio.CancelledError

2023-04-03 Thread Clint Olsen
On Friday, March 31, 2023 at 5:51:33 PM UTC-7, Chris Angelico wrote:
> Can you confirm that it is indeed failing to catch the exception? Try this: 
> 
> except asyncio.CancelledError: 
> print("Cancelled correctly") 
> 
> followed by the same type checking from above. Since the ID is the 
> same, I would expect it to match! 

Well, now this works, so it's difficult to say how that was happening. If I can 
reproduce it I'll update this conversation. Thanks for the help!

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


Re: Windows Gui Frontend

2023-04-03 Thread rbowman
On Sat, 1 Apr 2023 10:37:34 -0500, Eryk Sun wrote:

> On 4/1/23, Jim Schwartz  wrote:
>> I have another question.  I have an app written in python, but I want
>> to add a windows GUI front end to it.  Can this be done in python? 
>> What packages would allow me to do that?
> 
> Here are a few of the GUI toolkit libraries in common use:
> 
> * tkinter (Tk)
> * PyQt (Qt)
> * PySide (Qt)
> * wxPython (wxWidgets)
> * PyGObject (GTK)
> 
> tkinter is included in Python's standard library.

Not to go into a lot of history, if this is a commercial application, go 
with PySide rather than PyQt. They are very close, if not identical, until 
you get to licensing. 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Problem in using libraries

2023-04-03 Thread Barry


> On 3 Apr 2023, at 17:46, Pranav Bhardwaj  wrote:
> 
> Why can't I able to use python libraries such as numpy, nudenet, playsound,
> pandas, etc in my python 3.11.2. It always through the error "import
> 'numpy' or any other libraries could not be resolved".

You need to provide enough details for people to help you.

Include which OS you are using.
Where you got python from.
How you installed the libraries you are trying to use.
Commands and error messages you are seeing.

Barry


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

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


Problem in using libraries

2023-04-03 Thread Pranav Bhardwaj
Why can't I able to use python libraries such as numpy, nudenet, playsound,
pandas, etc in my python 3.11.2. It always through the error "import
'numpy' or any other libraries could not be resolved".
-- 
https://mail.python.org/mailman/listinfo/python-list


Problem in using libraries

2023-04-03 Thread Pranav Bhardwaj
Why can't I able to use python libraries such as numpy, nudenet, playsound,
in python 3.11.2
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Windows Gui Frontend

2023-04-03 Thread Rolf Blum

Am 02.04.2023 um 01:13 schrieb Alan Gauld:

On 01/04/2023 18:21, Jim Schwartz wrote:

Are there any ide’s that will let me design the screen and convert it to python?


There is nothing remotely like the VB or Delphi GUI builders.


The latest Delphi versions themself can create GUIs for Python. I use 
Delphi 10.4.2 (Sidney) Professional.

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