Re: pip/setuptools: Entry points not visible from pkexec-root-environment

2022-12-18 Thread Chris Angelico
On Mon, 19 Dec 2022 at 17:30, wrote: > > Am 18.12.2022 22:37 schrieb Mats Wichmann: > > the which command uses your PATH, so I'm not sure you're buying > > anything new there > > I'm using which before entering pkexec. ;) > > I'll show a demonstrator project later. Hmm, then I'm not sure what

Re: pip/setuptools: Entry points not visible from pkexec-root-environment

2022-12-18 Thread c . buhtz
Dear Barry, thanks for reply and asking back. Am 18.12.2022 22:33 schrieb Barry: Why are asking on this list and discuss.python.org? To be exact I'm asking in the "Packaging" section of "discuss.python.org". To my knowledge that section is the official channel of "pypa/pip" project pointed t

Re: pip/setuptools: Entry points not visible from pkexec-root-environment

2022-12-18 Thread c . buhtz
Am 18.12.2022 22:37 schrieb Mats Wichmann: the which command uses your PATH, so I'm not sure you're buying anything new there I'm using which before entering pkexec. ;) I'll show a demonstrator project later. -- https://mail.python.org/mailman/listinfo/python-list

Re: String to Float, without introducing errors

2022-12-18 Thread Cameron Simpson
On 19Dec2022 08:53, Cameron Simpson wrote: I'm no expert on floating point coding for precision, but I believe that trying to work with values "close together" in magnitude is important because values of different scales inherently convert one of them to the other scale (i.e. similar sized exp

Re: String to Float, without introducing errors

2022-12-18 Thread Greg Ewing
On 19/12/22 6:35 am, Paul St George wrote: So I am working on a physics paper with a colleague. We have a theory about Newtons Cradle. We want to illustrate the paper with animations. Because there is a problem, I am investigating in all areas. ... I would like to be in control of or fully aw

Re: Single line if statement with a continue

2022-12-18 Thread Tony Oliver
On Saturday, 17 December 2022 at 23:58:11 UTC, avi.e...@gmail.com wrote: > Is something sort of taboo when using something like a computer language to > write a program? With what else would you write a program? -- https://mail.python.org/mailman/listinfo/python-list

Re: String to Float, without introducing errors

2022-12-18 Thread Chris Angelico
On Mon, 19 Dec 2022 at 07:57, Stefan Ram wrote: > G = Decimal( 6.6743015E-11 ) > r = Decimal( 6.371E6 ) > M = Decimal( 5.9722E24 ) What's the point of using Decimal if you start with nothing more than float accuracy? ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: String to Float, without introducing errors

2022-12-18 Thread Cameron Simpson
On 18Dec2022 18:35, Paul St George wrote: So I am working on a physics paper with a colleague. We have a theory about Newtons Cradle. We answer the question why when you lift and drop balls 1 and 2, balls 4 and 5 rise up. I could say more, but ... (if you are interested please write to me).

Re: String to Float, without introducing errors

2022-12-18 Thread dn
On 18/12/2022 10.55, Stefan Ram wrote: Grant Edwards writes: Yes, fixed point (or decimal) is a better fit for what he's doing. but I suspect that floating point would be a better fit for the problem he's trying to solve. I'd like to predict that within the next ten posts in this thread

Re: pip/setuptools: Entry points not visible from pkexec-root-environment

2022-12-18 Thread Mats Wichmann
On 12/18/22 14:07, c.bu...@posteo.jp wrote: Dear Chris, thank you for your reply. Am 18.12.2022 20:27 schrieb Chris Angelico: Does it have to be in path? Can't you say /usr/local/bin/entrypointname? Not sure what constitutes an elegant solution here. I asked that myself. My current solution

Re: pip/setuptools: Entry points not visible from pkexec-root-environment

2022-12-18 Thread Barry
> On 18 Dec 2022, at 17:57, c.bu...@posteo.jp wrote: > > Hello, > > when I install a package on a GNU/Linux system via "sudo python3 -m pip > install -e ." that defines entry points in its pyproject.toml the entry > point starter scripts are located in /usr/locale/bin. > > That folder is in P

Re: pip/setuptools: Entry points not visible from pkexec-root-environment

2022-12-18 Thread c . buhtz
Dear Chris, thank you for your reply. Am 18.12.2022 20:27 schrieb Chris Angelico: Does it have to be in path? Can't you say /usr/local/bin/entrypointname? Not sure what constitutes an elegant solution here. I asked that myself. My current solution do determine the full path of the entrypoint

String to Float, without introducing errors

2022-12-18 Thread Paul St George
So I am working on a physics paper with a colleague. We have a theory about Newtons Cradle. We answer the question why when you lift and drop balls 1 and 2, balls 4 and 5 rise up. I could say more, but ... (if you are interested please write to me). We want to illustrate the paper with animatio

Re: Keeping a list of records with named fields that can be updated

2022-12-18 Thread songbird
Peter Otten wrote: ... > While I think what you need is a database instead of the collection of > csv files the way to alter namedtuples is to create a new one: > > >>> from collections import namedtuple > >>> Row = namedtuple("Row", "foo bar baz") > >>> row = Row(1, 2, 3) > >>> row._replace(bar=4

Re: String to Float, without introducing errors

2022-12-18 Thread rbowman
On Sun, 18 Dec 2022 11:14:28 -0500, Dennis Lee Bieber wrote: > .. And maybe lament the days when a 3-digit result was acceptable in > math class -- being the typical capability in reading a standard (10" > scale) slide rule. Arguably more thought was given to what those three digits meant in the

Re: Single line if statement with a continue

2022-12-18 Thread Dennis Lee Bieber
On Wed, 14 Dec 2022 10:53:10 -0800 (PST), Aaron P declaimed the following: Late response here, and the concept may have been covered in skimmed-over posts.. >I occasionally run across something like: > >for idx, thing in enumerate(things): >if idx == 103: >continue >do_s

Re: String to Float, without introducing errors

2022-12-18 Thread Thomas Passin
Thanks for filling us in! I wouldn't think the animations themselves would need such precision, though perhaps the calculations of the forces and motions do. One way to check might be to perturb the initial conditions a bit and see if the changes in the motions seem to be correspondingly smal

Re: pip/setuptools: Entry points not visible from pkexec-root-environment

2022-12-18 Thread Thomas Passin
Pip is fine for most packages, as it looks like you know. Some distros put some packages in unusual places, and those are the ones that either are not or should not be installed via pip. Which ones varies from distro to distro. (I just include this information here for others who haven't dis

Re: pip/setuptools: Entry points not visible from pkexec-root-environment

2022-12-18 Thread Chris Angelico
On Mon, 19 Dec 2022 at 04:56, wrote: > > Hello, > > when I install a package on a GNU/Linux system via "sudo python3 -m pip > install -e ." that defines entry points in its pyproject.toml the entry > point starter scripts are located in /usr/locale/bin. > > That folder is in PATH for "regular" roo

Re: Fwd: Installation hell

2022-12-18 Thread Chris Angelico
On Mon, 19 Dec 2022 at 06:10, Mats Wichmann wrote: > Why? Python is a command-line tool to process a language, Similar to > many other languages - Go, for example. Or a C/C++ compiler. *Or* you > can choose to use someone's wrapping of that process inside an > Integrated Development Environment.

Re: pip/setuptools: Entry points not visible from pkexec-root-environment

2022-12-18 Thread c . buhtz
Dear Gerard, thank you for your reply. Am 18.12.2022 19:45 schrieb Weatherby,Gerard: "sudo python3 -m pip install -e ." You’ve already started down a problematic road. I recommend installing root level Python packages through your system package manager. (apt for debian, or whatever RedHat is u

Fun with python string formatting

2022-12-18 Thread Axy via Python-list
Hi all, what do you see looking at format string syntax https://docs.python.org/3/library/string.html#formatstrings ? In particular, at something like this: {h[1].red.jumbo-header:Hello, World!} Yes, this is syntactically correct statement and if we tweak Formatter methods, we can generate

Re: Fwd: Installation hell

2022-12-18 Thread Mats Wichmann
On 12/18/22 04:50, Jim Lewis wrote: I'm an occasional user of Python and have a degree in computer science. Almost every freaking time I use Python, I go through PSH (Python Setup Hell). Sometimes a wrong version is installed. Sometimes it's a path issue. Or exe naming confusion: python, python3,

Re: pip/setuptools: Entry points not visible from pkexec-root-environment

2022-12-18 Thread Weatherby,Gerard
"sudo python3 -m pip install -e ." You’ve already started down a problematic road. I recommend installing root level Python packages through your system package manager. (apt for debian, or whatever RedHat is using now). If a package you need isn’t available from the system level virtual envir

String to Float, without introducing errors

2022-12-18 Thread Paul St George
So I am working on a physics paper with a colleague. We have a theory about Newtons Cradle. We answer the question why when you lift and drop balls 1 and 2, balls 4 and 5 rise up. I could say more, but ... (if you are interested please write to me). We want to illustrate the paper with animatio

pip/setuptools: Entry points not visible from pkexec-root-environment

2022-12-18 Thread c.buhtz
Hello, when I install a package on a GNU/Linux system via "sudo python3 -m pip install -e ." that defines entry points in its pyproject.toml the entry point starter scripts are located in /usr/locale/bin. That folder is in PATH for "regular" root users and by "sudo su" roots users. But I need to

Fwd: Installation hell

2022-12-18 Thread Jim Lewis
I'm an occasional user of Python and have a degree in computer science. Almost every freaking time I use Python, I go through PSH (Python Setup Hell). Sometimes a wrong version is installed. Sometimes it's a path issue. Or exe naming confusion: python, python3, phthon311, etc. Or library compatibil