Python 3.10.0a5 is now available

2021-02-03 Thread Pablo Galindo Salgado
Well, this one took a bit more time due to some surprise last time
reference leaks and release blockers to fix, but now Python 3.10.0a5 it’s
here. Will this be the first release announcement of the 3.10 series
without copy-paste typos? Go get it here:

https://www.python.org/downloads/release/python-3100a5/

*Major new features of the 3.10 series, compared to 3.9*

Python 3.10 is still in development. This release, 3.10.0a5 is the fifth of
seven planned alpha releases. Alpha releases are intended to make it easier
to test the current state of new features and bug fixes and to test the
release process. During the alpha phase, features may be added up until the
start of the beta phase (2021-05-03) and, if necessary, may be modified or
deleted up until the release candidate phase (2021-10-04). Please keep in
mind that this is a preview release and its use is not recommended for
production environments.

Many new features for Python 3.10 are still being planned and written.
Among the new major new features and changes so far:

   - PEP 623  – Remove wstr from
   Unicode
   - PEP 604  – Allow writing
   union types as X | Y
   - PEP 612  – Parameter
   Specification Variables
   - PEP 626  – Precise line
   numbers for debugging and other tools.
   - bpo-38605 : from __future__ import
   annotations (PEP 563 ) is now
   the default.
   - PEP 618  – Add Optional
   Length-Checking To zip.
   - bpo-12782 : Parenthesized context
   managers are now officially allowed.
   - (Hey, fellow core developer, if a feature you find important is
   missing from this list, let Pablo know .)

The next pre-release of Python 3.10 will be 3.10.0a6, currently scheduled
for 2021-03-01.
And now for something completely different

The Chandrasekhar limit is the maximum mass of a stable white dwarf star.
White dwarfs resist gravitational collapse primarily through electron
degeneracy pressure, compared to main sequence stars, which resist collapse
through thermal pressure. The Chandrasekhar limit is the mass above which
electron degeneracy pressure in the star’s core is insufficient to balance
the star’s own gravitational self-attraction. Consequently, a white dwarf
with a mass greater than the limit is subject to further gravitational
collapse, evolving into a different type of stellar remnant, such as a
neutron star or black hole. Those with masses up to the limit remain stable
as white dwarfs. The currently accepted value of the Chandrasekhar limit is
about 1.4 M☉ (2.765×1030 kg). So we can be safe knowing that our sun is not
going to become a black hole!

Regards from cloudy London,

Pablo Galindo Salgado
-- 
https://mail.python.org/mailman/listinfo/python-list


Fw: Trouble running python 3.6.4

2021-02-03 Thread damien jenman




From: damien jenman
Sent: Monday, 1 February 2021 10:29 AM
To: python-list@python.org 
Subject: Trouble running python 3.6.4

Hi

After setup being successful, of python 3.6.4 , it comes up online tutorial, 
documentation and whats new,  all being

underlined.

I click on one of these, and i try to type in search 'Command Prompt'. To get 
to the Command Prompt Window.

Unsuccesfully.

I then close the application.

I then double click the app in downloads.

It comes up with Modify Setup. Modify, Repair or Install.

All i wish to do is go to the Command Prompt and start programming.

Thanks Damien Jenman
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Fw: Trouble running python 3.6.4

2021-02-03 Thread Mats Wichmann

On 2/2/21 8:40 PM, damien jenman wrote:




From: damien jenman
Sent: Monday, 1 February 2021 10:29 AM
To: python-list@python.org 
Subject: Trouble running python 3.6.4

Hi

After setup being successful, of python 3.6.4 , it comes up online tutorial, 
documentation and whats new,  all being

underlined.

I click on one of these, and i try to type in search 'Command Prompt'. To get 
to the Command Prompt Window.

Unsuccesfully. >
I then close the application.

I then double click the app in downloads.

It comes up with Modify Setup. Modify, Repair or Install.


That's re-running the installer, don't do that (unless you actually need 
to Modify/Repair/Install).



All i wish to do is go to the Command Prompt and start programming.


From a shell window (if on Windows that means cmd or PowerShell), type 
"py" or "python".  The latter requires the path to have been amended, 
which is something the installer can do.


Or, from the start menu, select the Python folder and click the entry 
for the program, which in your case should be labeled "Python 3.6 
(64-bit)"  (or 32-bit if you installed the 32-bit version, of course). 
This is less good, because it will have you starting in Python's 
installation directory, which is probably not where you want to be working.


See https://docs.python.org/3/using/ and if pick the entry for the 
correct operating system.



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


SMS API

2021-02-03 Thread ismail nagi
Hello everyone. I would like to know how an sms api is created. And if this is 
possible with python, for example, using flask. Thank You
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: SMS API

2021-02-03 Thread Dieter Maurer
ismail nagi wrote at 2021-2-3 08:48 -0800:
>I would like to know how an sms api is created.

I assume that "sms api" means that your Python application should
be able to send SMS messages.
In this case, you need a service which interfaces between your
device (mobile phone, computer, tablet, ...) and the telephone network.
Such a service will provide some API - and depending on the type
of API, you might be able to use it in Python.
First thing is to find out about this service.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: SMS API

2021-02-03 Thread Dieter Maurer
ismail nagi wrote at 2021-2-3 21:06 +0300:
>Yes, its about sending messages. For example, something like
>twilio...it's an SMS API, can something like twilio be created using python
>and how (just a basic idea)? Thank You.

"twilio" provides a web service interface to send messages.
You can use Python libraries to access web services (e.g. "suds") -
and thereby, control the "twilio" service via Python applications.

If your aim is to implement a "twilio" like functionality out of the box,
you need a gateway between your device and the telephone network.
In particular, this gateway must ensure proper payment for the use
of the telephone network; as a consequence, access will be restricted
and subject to quite strict policies (to avoid abuse).
If your telephone network (access point) does not provide an easy
access, then it is likely very difficult to implement access on your own.

If you look for an application on a mobile phone, then the phone's
operating system likely provides a service to send SMS messages.
There are Python components to facilitate the use of Python
on mobile phones (but I have no experience in this domain).
With Python for mobile phones, it may be possible to access
those mobile phone services provided by the phone's operating system.
-- 
https://mail.python.org/mailman/listinfo/python-list


need help with a ctypes project for PyPI

2021-02-03 Thread Simon Zhang
Hi,

I have created a ctypes project as in the following link's first answer:
https://stackoverflow.com/questions/42585210/extending-setuptools-extension-to-use-cmake-in-setup-py

Since my machine's gcc is too high version or something, I used the docker
image located here:
https://quay.io/repository/pypa/manylinux2014_x86_64
to compile the copied .whl file. I ran auditwheel repair on my whl file
then copied it back to my local machine without complaints.

I'm not sure I understand the subsequent process I need to do with PyPI.

If I copy the manylinux2014 wheel back to my local machine  (into the dist
folder) and run the command:

python3 -m twine upload --repository testpypi dist/*

following the instructions from:
https://packaging.python.org/tutorials/packaging-projects/

when I pip3 install spamplusplus (this is the name I gave my test project)
https://test.pypi.org/project/spamplusplus/

I get that the CMakeLists.txt file is not existent. I used the same
setup.py file given in the link:
https://stackoverflow.com/questions/42585210/extending-setuptools-extension-to-use-cmake-in-setup-py

However I get the error that CMakeLists.txt file is not being uploaded?

 cmake /tmp/pip-build-6ff9ifuu/spamplusplus
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-build-6ff9ifuu/spamplusplus/build/lib.linux-x86_64-3.6/spamplusplus
-DCMAKE_BUILD_TYPE=Release
  CMake Error: The source directory
"/tmp/pip-build-6ff9ifuu/spamplusplus" does not appear to contain
CMakeLists.txt.

I think this is something basic involving paths but could be more involved.

Can anyone help!!

Thanks,

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


Re: Response for PING in ircbot.

2021-02-03 Thread dn via Python-list


On 04/02/2021 07.07, Dennis Lee Bieber wrote:
> On Tue, 02 Feb 2021 20:26:34 -0500, Random832 
> declaimed the following:
> 
> 
>> 1. It looks like you're forgetting to send \n\r
> 
>   Isn't the convention \r\n -- from the days of teletype, when the return
> took longer to complete than the line feed, so start return, have it finish
> while the line feed activates...

Yes, "CRLF" = Carriage Return (chr( 13 )) and Line-Feed (chr( 10 )).


>   The order didn't matter in the .strip() call as that strips any
> leading/trailing characters that match any of the provided set, it is not a
> "trim" of the exact sequence (hmm, looks like that would be require using
> string.removeprefix("\n\r").removesuffix("\n\r") if the expected sequence
> were such).

If every line ends with the same (odd) suffix, then why not slice the
string [ :-2 ]?

Alternately, consider str.translate() where both character codes are
removed, regardless of location.
-- 
Regards,
=dn
-- 
https://mail.python.org/mailman/listinfo/python-list