Re: Embedding version in command-line program

2020-10-08 Thread Loris Bennett
Marco Sulla  writes:

> On Wed, 7 Oct 2020 at 14:16, Loris Bennett 
> wrote:
>
>> But the toml file isn't part of the distribution and so it won't be
>> installed.
>>
>> I suppose I could write a separate program which parses the toml file
>> and then just injects the version into __init__.py.
>
> Yes, I do not know poetry, but I suppose you can generate it in its
> setup. I usually create a separate VERSION file and I read it in
> __init__.py. Other people creates a version.py that is evaled inside
> __init__.py

I ended up using the module 

  poetry_version

which allows one to extract the version like this:

  import poetry_version

  __version__ = poetry_version.extract(source_file=__file__)

Cheers,

Loris

-- 
This signature is currently under construction.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: help with installation

2020-10-08 Thread Mats Wichmann
On 10/7/20 2:00 AM, rebecca kahn wrote:
> Good morning.
> I need to install numpy and matplotlib  for school. But everytime I run the 
> comand i get a error on the metadata fase. Can you offer assistance?
> Sincerely Rebecca Kahn
> 
> Microsoft Windows [Version 10.0.18362.1082]
> (c) 2019 Microsoft Corporation. Todos os direitos reservados.
> 
> C:\Users\Acer>python -m pip install numpy
> Collecting numpy
>   Using cached numpy-1.19.2.zip (7.3 MB)
>   Installing build dependencies ... done
>   Getting requirements to build wheel ... done
> Preparing wheel metadata ... error
> ERROR: Command errored out with exit status 1:

Short answer: be patient.

The root of this problem is Python 3.9 was *just* released, and some
(many?) of the packages on PyPI that include version-specific wheels
have not been updated yet.

Use a Python 3.8 version if you're in a hurry.  There is a site that has
unofficial builds of many interesting packages for Windows, but
personally I'm a little reluctant to point people there, as they're
unsupported if there are problems.

You can check the numpy status, as for any package on PyPI by searching
it and going to the list of downloadable files.  Here:

https://pypi.org/project/numpy/#files

Slightly longer description - why you see lots of scary error messages -
is since pip doesn't find an appropriate wheel, it embarks on the
process of building one from the source distribution.  This nearly
always fails for the ordinary Windows user, since the required build
setup will not be present, complete, or configured.  The errors come
from this, but that's only because the per-built wheel was not found.

(this happens every time a new Python version, that is X in 3.X comes out)

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


Re: help with installation

2020-10-08 Thread MRAB

On 2020-10-08 17:28, Mats Wichmann wrote:

On 10/7/20 2:00 AM, rebecca kahn wrote:

Good morning.
I need to install numpy and matplotlib  for school. But everytime I run the 
comand i get a error on the metadata fase. Can you offer assistance?
Sincerely Rebecca Kahn

Microsoft Windows [Version 10.0.18362.1082]
(c) 2019 Microsoft Corporation. Todos os direitos reservados.

C:\Users\Acer>python -m pip install numpy
Collecting numpy
  Using cached numpy-1.19.2.zip (7.3 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:


Short answer: be patient.

The root of this problem is Python 3.9 was *just* released, and some
(many?) of the packages on PyPI that include version-specific wheels
have not been updated yet.

Use a Python 3.8 version if you're in a hurry.  There is a site that has
unofficial builds of many interesting packages for Windows, but
personally I'm a little reluctant to point people there, as they're
unsupported if there are problems.

You can check the numpy status, as for any package on PyPI by searching
it and going to the list of downloadable files.  Here:

https://pypi.org/project/numpy/#files

Slightly longer description - why you see lots of scary error messages -
is since pip doesn't find an appropriate wheel, it embarks on the
process of building one from the source distribution.  This nearly
always fails for the ordinary Windows user, since the required build
setup will not be present, complete, or configured.  The errors come
from this, but that's only because the per-built wheel was not found.

(this happens every time a new Python version, that is X in 3.X comes out)


It's always worth looking at Christoph Gohlke's site:

https://www.lfd.uci.edu/~gohlke/pythonlibs/

Yes, it does have numpy and matplotlib.
--
https://mail.python.org/mailman/listinfo/python-list


ANN: Wing Python IDE 7.2.6 has been released

2020-10-08 Thread Wingware
Wing 7.2.6 improves exception reporting for pytest, implements 2w in vi 
mode, fixes problems with setting up a new Django project, improves 
auto-spacing for / and :, reduces CPU use when analyzing and waiting for 
remote files, and makes a number of usability improvements.


Details:  https://wingware.com/news/2020-10-07
Downloads:   https://wingware.com/downloads

== About Wing ==

Wing is a light-weight but full-featured Python IDE designed 
specifically for Python, with powerful editing, code inspection, 
testing, and debugging capabilities. Wing's deep code analysis provides 
auto-completion, auto-editing, and refactoring that speed up 
development. Its top notch debugger works with any Python code, locally 
or on a remote host. Wing also supports test-driven development, version 
control, UI color and layout customization, and includes extensive 
documentation and support.


Wing is available in three product levels:  Wing Pro is the 
full-featured Python IDE for professional developers, Wing Personal is a 
free Python IDE for students and hobbyists (omits some features), and 
Wing 101 is a very simplified free Python IDE for beginners (omits many 
features).


Learn more at https://wingware.com/



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


Help! I broke python 3.9 installation on macOS

2020-10-08 Thread Elliott Roper
First problem: I can no longer say
Obfuscated@MyMac ~ % python3 pip -m list

It cries in pain with:

/Library/Frameworks/Python.framework/Versions/3.9/bin/python3: can't open file
'/Users/Obfuscated/pip': [Errno 2] No such file or directory.
Why is it looking at my $HOME??

Here's some hopefully relevant outputs:

First, this to show terminal has picked up $PATH from .zprofile and runs
python 3.9.0

Obfuscated@MyMac ~ % python3
Python 3.9.0 (v3.9.0:9cf6752276, Oct  5 2020, 11:29:23) 
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> ^D

however, typing various flavours of pip commands direct into the shell gives
me this:-

Obfuscated@MyMac ~ % pip3 list
PackageVersion
-- ---
pip20.2.3
setuptools 49.2.1

and


Obfuscated@MyMac ~ % pip3.8 list
Package Version
--- -
certifi 2020.6.20
cycler  0.10.0
kiwisolver  1.2.0
matplotlib  3.3.2
numexpr 2.7.1
numpy   1.19.2
pandas  1.1.2
Pillow  7.2.0
pip 20.2.3
pyparsing   2.4.7
python-dateutil 2.8.1
pytz2020.1
scipy   1.5.2
setuptools  49.2.1
six 1.15.0
wheel   0.35.1
Obfuscated@MyMac ~ %

Something has gone wrong with site.py probably unable to fall back to using
the older site-packages because of my $PATH abuse.

which now reads as

echo $PATH
/Library/Frameworks/Python.framework/Versions/3.9/bin:/Library/Frameworks/Pyt
hon.framework/Versions/3.8/bin:/Users/Obfuscated/bin:/usr/local/bin:/usr/bin:
/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/usr/local/MacGPG2/bin:/Library/Appl
e/usr/bin

I tried installing the packages into 3.9 one at a time but got errors
indicating that it was trying to re-compile modules like pandas from source. I
saw a reply to a windows user on this list today who was advised to be patient
because 3.9 might be too new to have all the binary modules in PyPi

I scrubbed all of 3.9 from
/Library/Frameworks/Python.framework/Versions/
and re-installed python 3.9 from Python.org to get back to the same situation
described above.

I have tried to work out what was wrong by reading site.py but got lost.

Am I facing a ruthless deletion of every trace of Python and starting again,
or waiting patiently for the binary modules to appear (3.8 still works OK, so
I can live with that)??

Or is there some piece of obvious magic I have missed blundering in the land
of the Sorcerer's Apprentice?

Thanks
-- 
To de-mung my e-mail address:- fsnospam$elliott$$
PGP Fingerprint: 1A96 3CF7 637F 896B C810  E199 7E5C A9E4 8E59 E248


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


Re: Help! I broke python 3.9 installation on macOS

2020-10-08 Thread Chris Angelico
On Fri, Oct 9, 2020 at 10:36 AM Elliott Roper  wrote:
>
> First problem: I can no longer say
> Obfuscated@MyMac ~ % python3 pip -m list
>
> It cries in pain with:
>
> /Library/Frameworks/Python.framework/Versions/3.9/bin/python3: can't open file
> '/Users/Obfuscated/pip': [Errno 2] No such file or directory.
> Why is it looking at my $HOME??
>

If that's an exact copy/paste from your terminal session, I may have
some good news for you: the solution is easy. Try "python3 -m pip
list" instead - putting the "-m" before "pip" instead of after it -
and see if that solves your problem :)

It's looking in your home directory because that's the current
directory. If you'd typed "python3 pip.py" with no other arguments,
it's more obvious that it should be reading that file from the current
directory.

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


Re: Help! I broke python 3.9 installation on macOS

2020-10-08 Thread Richard Damon
On 10/8/20 7:31 PM, Elliott Roper wrote:
> First problem: I can no longer say
> Obfuscated@MyMac ~ % python3 pip -m list

isn't that supposed to be python3 -m pip list


-- 
Richard Damon

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


Re: Thank you Larry Hastings!

2020-10-08 Thread 황병희
Barry Warsaw  writes:

> They say being a Python Release Manager is a thankless job, so the
> Python Secret Underground (PSU), which emphatically does not exist,
> hereby officially doesn’t thank Larry for his years of diligent
> service as the Python 3.4 and 3.5 release manager.
>
> On the other hand, the Python Steering Council, Python Software
> Foundation, and worldwide Python community, all of which emphatically
> *do* exist, all extend our heartfelt thanks to Larry for his excellent
> stewardship of Python 3.4 and 3.5!
>
> Python 3.4 and 3.5 were both pivotal releases.  While the features of
> these two releases are too numerous to mention here, they introduced
> such staples as:
>
> * asyncio
> * enum
> * pathlib
> * async and await keywords
> * matrix multiplication operators
> * typing and zipapp modules
>
> and so much more.  For details, see:
>
> * https://docs.python.org/3/whatsnew/3.4.html
> * https://docs.python.org/3/whatsnew/3.5.html
>
> Larry’s first official release of 3.4.0a1 was on 2013-08-03 and his
> last Python 3.5.10 release was 2020-09-05.  That’s 7 years of
> exemplary release managing!
>
> Larry, from all of us, and from me personally, thank you so much for
> your invaluable contributions to Python.  Enjoy your retirement!
>
> Cheers,
> -Barry (on behalf of the PSC and PSF)

7 years is very long. Also i would like to add personal "Thanks".

Sincerely, Python fan Byung-Hee

-- 
^고맙습니다 _白衣從軍_ 감사합니다_^))//
-- 
https://mail.python.org/mailman/listinfo/python-list


Issues installing python

2020-10-08 Thread Vedant Nichal
Hello,

I am an amateur python developer but I’m facing a lot of issues regarding
python installation on windows 10...whenever I install python on my
pc...irrespective of its version my scripts folder is always empty..so I
tried installing pip from the zip file available at pypi.org...pip got
installed successfully but when I used it I received an error saying…

OsError [Errno9]: Bad File Descriptor

So, I’m not able to install pip and other modules due to which I’m facing a
lot of issues.

I would really appreciate a lot if you can help me out of this.

I have tried out alternatives for python interpreters like anaconda,
miniconda, win python, etc.. But in vain..

I have tried 100s of solutions but still for no good...

Requesting you to please please please help me out of this...

I will be really happy and grateful to you if you could help me out of
this...



Thanks and Regards,

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


file to bits text and text containing bits to file

2020-10-08 Thread Harshit Sharma
I want to read bits data of all file of any extention in 0s and 1s. And also 
want to do back means means construct file from bits text data how to do that 
tell with proof please. I am on a work of something like new sloot method but 
here I stuck.help everything else is done.
-- 
https://mail.python.org/mailman/listinfo/python-list