Re: A new feature request - parser add_mutually_exclusive_group - add a default value

2024-07-09 Thread אורי via Python-list
Thank you. Uri. אורי u...@speedy.net On Tue, Jul 9, 2024 at 6:40 PM Barry Scott wrote: > > > On 9 Jul 2024, at 06:13, ⁨אורי via Python-list⁩ <⁨python-list@python.org⁩> > wrote: > > I tried to subscribe to Python-ideas > > > These days ideas are discussed on https://discuss.python.org/ > It is

Re: A new feature request - parser add_mutually_exclusive_group - add a default value

2024-07-09 Thread Barry Scott via Python-list
> On 9 Jul 2024, at 06:13, ⁨אורי via Python-list⁩ <⁨python-list@python.org⁩> > wrote: > > I tried to subscribe to Python-ideas These days ideas are discussed on https://discuss.python.org/ It is rare to see an idea on the mailing list. Barry -- https://mail.python.org/mailman/listinfo/pyt

A new feature request - parser add_mutually_exclusive_group - add a default value

2024-07-08 Thread אורי via Python-list
Hi, Please look at this Stack Overflow post: https://stackoverflow.com/questions/78722378/parser-add-mutually-exclusive-group-how-can-i-set-a-default-value 1. Is there a way to add a default to parser add_mutually_exclusive_group groups - a value that will be set by default? In this case I want t

Request to Review: Tutorial about Python Packaging offering different use case

2023-12-13 Thread Christian Buhtz via Python-list
Hello, I would like to point to my Python Packaging Tutorial explaining several common use cases using minimal demo projects. I am not an expert and assume that some of my solutions might not be the best. So I would appreciate if you ca

Re: Request: inspect: signature & getfullargspec & getcallargs

2023-12-04 Thread Barry Scott via Python-list
> On 4 Dec 2023, at 02:29, Dom Grigonis via Python-list > wrote: > > Hello, > > I have a request. > > Would it be possible to include `follow_wrapper_chains` and `skip_bound_arg` > arguments to higher level functions of `inspect` module? > > Would expos

Request: inspect: signature & getfullargspec & getcallargs

2023-12-03 Thread Dom Grigonis via Python-list
Hello, I have a request. Would it be possible to include `follow_wrapper_chains` and `skip_bound_arg` arguments to higher level functions of `inspect` module? Would exposing them, but setting defaults to what they currently are, be possible? I sometimes need: * `getcallargs`, but

Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-11 Thread Dennis Lee Bieber via Python-list
On Sat, 10 Jun 2023 11:32:53 -0500, Eryk Sun declaimed the following: >On 6/10/23, Thomas Passin via Python-list wrote: >> >> We can find pip.exe using good old-fashioned dir (we don't need any >> new-fangled Powershell): >> >> C:\Users\tom>dir AppData\Local\Programs\Python /Aa /S /W /B |find >>

Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-10 Thread Thomas Passin via Python-list
On 6/10/2023 3:20 PM, Eryk Sun wrote: On 6/10/23, Thomas Passin via Python-list wrote: Yes; I didn't want to get too esoteric with commands that are hard to figure out and remember, because then why not use Powershell, whose commands are hard to figure out and remember? Using `dir /s [/ad] [

Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-10 Thread Eryk Sun via Python-list
On 6/10/23, Thomas Passin via Python-list wrote: > > Yes; I didn't want to get too esoteric with commands that are hard to > figure out and remember, because then why not use Powershell, whose > commands are hard to figure out and remember? Using `dir /s [/ad] [/b] "[path\]pattern"` with a wildca

Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-10 Thread Thomas Passin via Python-list
On 6/10/2023 12:32 PM, Eryk Sun wrote: On 6/10/23, Thomas Passin via Python-list wrote: We can find pip.exe using good old-fashioned dir (we don't need any new-fangled Powershell): C:\Users\tom>dir AppData\Local\Programs\Python /Aa /S /W /B |find "pip"|find "Scripts" CMD's `dir` and `for` c

Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-10 Thread Eryk Sun via Python-list
On 6/10/23, Thomas Passin via Python-list wrote: > > We can find pip.exe using good old-fashioned dir (we don't need any > new-fangled Powershell): > > C:\Users\tom>dir AppData\Local\Programs\Python /Aa /S /W /B |find > "pip"|find "Scripts" CMD's `dir` and `for` commands support simple wildcard m

Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-10 Thread Thomas Passin via Python-list
On 6/9/2023 1:43 PM, Dennis Lee Bieber via Python-list wrote: On Thu, 8 Jun 2023 17:22:22 -0400, Thomas Passin declaimed the following: On 6/8/2023 3:14 PM, Dennis Lee Bieber via Python-list wrote: C:\Users\Owner> -=-=- Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserv

Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-09 Thread Dennis Lee Bieber via Python-list
On Thu, 8 Jun 2023 17:22:22 -0400, Thomas Passin declaimed the following: >On 6/8/2023 3:14 PM, Dennis Lee Bieber via Python-list wrote: > C:\Users\Owner> >> -=-=- >> Windows PowerShell >> Copyright (C) Microsoft Corporation. All rights reserved. >> >> Try the new cross-platform PowerShell https

Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-09 Thread Gisle Vanem via Python-list
Dennis Lee Bieber wrote: Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. Try the new cross-platform PowerShell https://aka.ms/pscore6 PS C:\Users\Owner> Get-ChildItem -Path C:\Python310\ -Recurse -Name -Filter "pip.*" Tried it. Oh man what a slow process: sync

Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-08 Thread Thomas Passin via Python-list
On 6/8/2023 6:23 PM, Eryk Sun wrote: on 6/8/23, Thomas Passin via Python-list wrote: It always gets installed, though. By default, the option to install pip is enabled. It's implemented by executing ensurepip after the interpreter is installed. However, ensurepip may silently fail during ins

Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-08 Thread Eryk Sun via Python-list
On 6/8/23, Thomas Passin via Python-list wrote: > > It always gets installed, though. By default, the option to install pip is enabled. It's implemented by executing ensurepip after the interpreter is installed. However, ensurepip may silently fail during installation. As a CPython triager I've c

Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-08 Thread Thomas Passin via Python-list
On 6/8/2023 3:14 PM, Dennis Lee Bieber via Python-list wrote: On Wed, 7 Jun 2023 10:36:22 -0600, Mats Wichmann declaimed the following: I'm assuming you checked - say, with Explorer - that pip.exe really is where you think it is? Anyway, if you ask a Windows shell (cmd) to locate it, and it

Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-08 Thread Dennis Lee Bieber via Python-list
On Wed, 7 Jun 2023 10:36:22 -0600, Mats Wichmann declaimed the following: >I'm assuming you checked - say, with Explorer - that pip.exe really is >where you think it is? >Anyway, if you ask a Windows shell (cmd) to locate it, and it doesn't, >then your PATH is not set up correctly after all.

Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-08 Thread Eryk Sun via Python-list
On 6/7/23, Thomas Passin via Python-list wrote: > On 6/7/2023 6:28 PM, Eryk Sun wrote: > >> That won't be of any help if pip isn't installed. By default, Python's >> installer attempts to install pip by running the ensurepip package, >> but sometimes it fails. It can help to try to manually run en

Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-07 Thread Thomas Passin via Python-list
On 6/7/2023 6:28 PM, Eryk Sun wrote: On 6/7/23, Thomas Passin via Python-list wrote: You have by now seen several responses, and the one most likely to be helpful is to run pip with py -m pip That won't be of any help if pip isn't installed. By default, Python's installer attempts to instal

Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-07 Thread Eryk Sun via Python-list
On 6/7/23, Thomas Passin via Python-list wrote: > > You have by now seen several responses, and the one most likely to be > helpful is to run pip with > > py -m pip That won't be of any help if pip isn't installed. By default, Python's installer attempts to install pip by running the ensurepip pa

Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-07 Thread Thomas Passin via Python-list
he 'get-pip.py' installation script from the command line, but it did not work either. I am aware that 'pip' is typically installed automatically with Python, but I am encountering this persistent difficulty. Therefore, I would like to request your assistance and expertise in reso

Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-07 Thread Mats Wichmann via Python-list
On 6/7/23 10:08, MRAB via Python-list wrote: On 2023-06-07 15:54, Florian Guilbault via Python-list wrote: Dear Python Technical Team, I hope this email finds you well. I am reaching out to you today to seek assistance with an issue I am facing regarding the installation of 'pip' despite my num

Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-07 Thread MRAB via Python-list
#x27;get-pip.py' installation script from the command line, but it did not work either. I am aware that 'pip' is typically installed automatically with Python, but I am encountering this persistent difficulty. Therefore, I would like to request your assistance and expertise in reso

Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-07 Thread Barry via Python-list
figured to include the path > to the Python Scripts directory. I have also attempted to run the > 'get-pip.py' installation script from the command line, but it did not work > either. > > I am aware that 'pip' is typically installed automatically with Python, but &

Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-07 Thread Florian Guilbault via Python-list
but it did not work either. I am aware that 'pip' is typically installed automatically with Python, but I am encountering this persistent difficulty. Therefore, I would like to request your assistance and expertise in resolving this 'pip' installation issue. I would like to be

Re: [Request for Assistance] To uninstall python installed in other user profile (Win 10)

2023-04-10 Thread Thomas Passin
: Re: [Request for Assistance] To uninstall python installed in other user profile (Win 10) [cid:image001.png@01D96BB7.7B62F3D0] If Python was installed by user A in their own profile folder, it is likely that it was installed just for that user. In this case, you may need to log in as user A to

Re: [Request for Assistance] To uninstall python installed in other user profile (Win 10)

2023-04-10 Thread Sravan Kumar Chitikesi
If Python was installed by user A in their own profile folder, it is likely that it was installed just for that user. In this case, you may need to log in as user A to uninstall Python from their profile. Have you tried logging in as user A and uninstalling Python from there? Regards, *Sravan Chit

RE: [Request for Assistance] To uninstall python installed in other user profile (Win 10)

2023-04-09 Thread Yogesh Tirthkar
Kumar Chitikesi Sent: Monday, April 10, 2023 2:17 PM To: Yogesh Tirthkar Cc: python-list@python.org Subject: Re: [Request for Assistance] To uninstall python installed in other user profile (Win 10) [cid:image001.png@01D96BB7.7B62F3D0] If Python was installed by user A in their own profile

Re: [Request for Assistance] To uninstall python installed in other user profile (Win 10)

2023-04-09 Thread Thomas Passin
ower, Singapore 068912 -Original Message- From: Python-list On Behalf Of Thomas Passin Sent: Wednesday, March 29, 2023 12:19 AM To: python-list@python.org Subject: Re: [Request for Assistance] To uninstall python installed in other user profile (Win 10) [[External Mail] Do not cl

RE: [Request for Assistance] To uninstall python installed in other user profile (Win 10)

2023-04-09 Thread Yogesh Tirthkar
| 168 Robinson Road, #37-01, Capital Tower, Singapore 068912 -Original Message- From: Python-list On Behalf Of Thomas Passin Sent: Wednesday, March 29, 2023 12:19 AM To: python-list@python.org Subject: Re: [Request for Assistance] To uninstall python installed in other user profile (W

Re: [Request for Assistance] To uninstall python installed in other user profile (Win 10)

2023-03-28 Thread Thomas Passin
On 3/28/2023 12:56 AM, Yogesh Tirthkar wrote: Hi Team, Could you please advise on the scenario in windows 10 machine : Where we need to uninstall/remove python from user profile A (installed by user A in its own profile folder) - via an admin user or system account. Currently when we try to u

[Request for Assistance] To uninstall python installed in other user profile (Win 10)

2023-03-28 Thread Yogesh Tirthkar
Hi Team, Could you please advise on the scenario in windows 10 machine : Where we need to uninstall/remove python from user profile A (installed by user A in its own profile folder) - via an admin user or system account. Currently when we try to uninstall it via admin/system account - it displa

Re: [Help Request] Embedding Python in a CPP Application Responsibly & Functionally

2023-01-26 Thread Dieter Maurer
John McCardle wrote at 2023-1-25 22:31 -0500: > ... >1) To get the compiled Python to run independently, I have to hack >LD_LIBRARY_PATH to get it to execute. `LD_LIBRARY_PATH=./Python-3.11.1 >./Python-3.11.1/python` . The need to set `LD_LIBRARY_PATH` usually can be avoided via a link time option

[Help Request] Embedding Python in a CPP Application Responsibly & Functionally

2023-01-25 Thread John McCardle
Greetings, I'm working on embedding a Python interpreter into a C++ application. My embedding example program is here, largely taken from Python docs: https://gist.github.com/jmccardle/f3f19d3753ae023aa52b927f0d181c43 I'm simply not interested in writing in Lua, so regardless of any particul

Re: Request for assistance (hopefully not OT)

2022-05-21 Thread Michael Torrie
On 5/21/22 06:19, o1bigtenor wrote: > more useful - - - - well - - - - I don't have to wonder why 'linux' is > used as much > by the general populace as it is. The community likes to destroy > itself - - - it > is a pity - - - - the community has so much to offer. As far as community goes, the Lin

Re: Request for assistance (hopefully not OT)

2022-05-21 Thread o1bigtenor
On Tue, May 17, 2022 at 6:20 AM o1bigtenor wrote: > > Greetings > > I was having space issues in my /usr directory so I deleted some > programs thinking that the space taken was more an issue than having > older versions of the program. > Found the responses to my requ

Re: Request for assistance (hopefully not OT)

2022-05-18 Thread Loris Bennett
Chris Angelico writes: > On Wed, 18 May 2022 at 04:05, Loris Bennett > wrote: >> >> [snip (26 lines)] >> >> > I think you had a problem before that. Debian testing is not an >> > operating system you should be using if you have a fairly good >> > understanding of how Debian (or Linux in genera

Re: Request for assistance (hopefully not OT)

2022-05-17 Thread Michael Torrie
On 5/17/22 05:20, o1bigtenor wrote: > What can I do to correct this self-inflicted problem? Those are always the fun ones. Reminds me of when I was first learning Linux using Red Hat Linux 5.0 or 5.1. This was long before nice dependency-solving tools like apt. I wanted to install and run StarO

Re: Request for assistance (hopefully not OT)

2022-05-17 Thread Chris Angelico
On Wed, 18 May 2022 at 04:05, Loris Bennett wrote: > > [snip (26 lines)] > > > I think you had a problem before that. Debian testing is not an > > operating system you should be using if you have a fairly good > > understanding of how Debian (or Linux in general) works. > > Should be > > I thin

Re: Request for assistance (hopefully not OT)

2022-05-17 Thread Chris Angelico
On Wed, 18 May 2022 at 04:05, Loris Bennett wrote: > > So now I have problems. > > I think you had a problem before that. Debian testing is not an > operating system you should be using if you have a fairly good > understanding of how Debian (or Linux in general) works. I take issue with that! D

Re: Request for assistance (hopefully not OT)

2022-05-17 Thread Grant Edwards
On 2022-05-17, Loris Bennett wrote: > It might be possible to fix the system. If will probably be fairly > difficult, but you would probably learn a lot doing it. However, if I > were you, I would just install Debian stable over your borked system and > then learn a bit more about package manag

Re: Request for assistance (hopefully not OT)

2022-05-17 Thread Loris Bennett
on2.7-minimal (--configure): > installed python2.7-minimal package post-installation script > subprocess returned error exit status 2 > Setting up python3.9-minimal (3.9.12-1) ... > update-binfmts: warning: /usr/share/binfmts/python3.9: no executable > /usr/bin/python3.9 found,

Re: Request for assistance (hopefully not OT)

2022-05-17 Thread Loris Bennett
[snip (26 lines)] > I think you had a problem before that. Debian testing is not an > operating system you should be using if you have a fairly good > understanding of how Debian (or Linux in general) works. Should be I think you had a problem before that. Debian testing is not an operatin

Re: Request for assistance (hopefully not OT)

2022-05-17 Thread Chris Angelico
post-installation script > subprocess returned error exit status 2 > Setting up python3.9-minimal (3.9.12-1) ... > update-binfmts: warning: /usr/share/binfmts/python3.9: no executable > /usr/bin/python3.9 found, but continuing anyway as you request > /var/lib/dpkg/info/python3

Re: Request for assistance (hopefully not OT)

2022-05-17 Thread Martin Di Paola
post-installation script subprocess returned error exit status 2 Setting up python3.9-minimal (3.9.12-1) ... update-binfmts: warning: /usr/share/binfmts/python3.9: no executable /usr/bin/python3.9 found, but continuing anyway as you request /var/lib/dpkg/info/python3.9-minimal.postinst: 51: /usr/

Request for assistance (hopefully not OT)

2022-05-17 Thread o1bigtenor
continuing anyway as you request /var/lib/dpkg/info/python3.9-minimal.postinst: 51: /usr/bin/python3.9: not found dpkg: error processing package python3.9-minimal (--configure): installed python3.9-minimal package post-installation script subprocess returned error exit status 127 dpkg: dependency probl

Re: Feature Request

2022-03-23 Thread Dennis Lee Bieber
On Wed, 23 Mar 2022 01:55:37 -0700 (PDT), Kazuya Ito declaimed the following: >Add "trun()" function to Python to truncate decimal part. You'll have to define what specific behavior you think is missing from the currently available functions? >>> plusover = 2.78 >>> plusunder = 3.14 >>>

Re: Feature Request

2022-03-23 Thread Michael F. Stemper
On 23/03/2022 03.55, Kazuya Ito wrote: Add "trun()" function to Python to truncate decimal part. Which of these should its behavior copy? from math import pi int(pi) 3 pi-int(pi) 0.14159265358979312 -- Michael F. Stemper This post contains greater than 95% post-consumer bytes by weight

Feature Request

2022-03-23 Thread Kazuya Ito
Add "trun()" function to Python to truncate decimal part. -- https://mail.python.org/mailman/listinfo/python-list

Re: Request to advise error for python.

2021-10-23 Thread tommy yama
Thank you MRAB. As somebody mentioned before, the easiest solution is you can do pip install before typing python. That would work. On Sun, Oct 24, 2021 at 12:00 AM MRAB wrote: > On 2021-10-23 14:53, tommy yama wrote: > > It seems you use windows to install. > > > > > > Then, you need conda. Pi

Re: Request to advise error for python.

2021-10-23 Thread MRAB
On 2021-10-23 14:53, tommy yama wrote: It seems you use windows to install. Then, you need conda. Pip works for Linux. On Windows, 'conda' is for the Anaconda version of Python. If you're using the standard version of Python from python.org you use pip or, preferably, py -m pip. Check thi

Re: Request to advise error for python.

2021-10-23 Thread tommy yama
It seems you use windows to install. Then, you need conda. Pip works for Linux. Check this out. https://numpy.org/install/ On Thu, Oct 21, 2021, 11:35 PM Grant Edwards wrote: > On 2021-10-21, Mats Wichmann wrote: > > > There are some nuances. If you are on a Linux system, Python is a > > s

Re: Request to advise error for python.

2021-10-21 Thread Grant Edwards
On 2021-10-21, Mats Wichmann wrote: > There are some nuances. If you are on a Linux system, Python is a > system program and you don't want to try to install into system > locations (you'll run into permission problems anyway), so trying a user > install is useful. So: > > pip install --user

Re: Request to advise error for python.

2021-10-21 Thread Mats Wichmann
On 10/20/21 23:10, 정성학(대학원생-자동차IT융합전공) via Python-list wrote: Hi There are some errors in order to install numpy as follows. pip install numpy File "", line 1 pip install numpy ^ SyntaxError: invalid syntax. Perhaps you forgot a comma? Would you advise me to co

Re: Request to advise error for python.

2021-10-21 Thread 황병희
황병희 writes: > Dear 정성학, > [image: image.png] > > If you would like to show us your image, then write down the github/gitlab > link. ... This is example: https://gitlab.com/soyeomul/test/-/commit/80d2b4f5e8eda0238301e9bca5bc33f0127572fd Sincerely, Gopher Byung-Hee -- https://mail.python.or

Re: Request to advise error for python.

2021-10-21 Thread 대학원생-자동차IT융합전공
Hi There are some errors in order to install numpy as follows. >>> pip install numpy File "", line 1 pip install numpy ^ SyntaxError: invalid syntax. Perhaps you forgot a comma? Would you advise me to correct error and install numpy or pandas? [image: image.png]

Re: Request to advise error for python.

2021-10-19 Thread 황병희
Dear 정성학, >>> [image: image.png] If you would like to show us your image, then write down the github/gitlab link. Of course i assume you have github/gitlab account. Because Mailing server does filter for dangerous things such as image file, video clip, action scripts (computer virus), i think...

Re: Request to advise error for python.

2021-10-15 Thread Michael Torrie
On 10/15/21 5:37 PM, 정성학(대학원생-자동차IT융합전공) via Python-list wrote: > Dear Sir, > > resend request Unfortunately your message is still blank. Attachments such as screenshots are not visible to this list. Whenever you ask questions on the list it is helpful to: - state the operating syste

Re: Request to advise error for python.

2021-10-15 Thread 대학원생-자동차IT융합전공
Dear Sir, resend request === Seonghark Jeong KUL(Kookmin Unmanned vehicle research Laboratory) GSAEK, Kookmin Univ. E-Mail: seongh...@kookmin.ac.kr HP: 82-10-3600-7143 === 2021년 10월 16일 (토) 오전 8:08, ‍정성학(대학원생

Re: Request for argmax(list) and argmin(list)

2021-09-02 Thread Dan Stromberg
How about this?: python3 -c 'list_ = [1, 3, 5, 4, 2]; am = max((value, index) for index, value in enumerate(list_)); print(am)' On Wed, Sep 1, 2021 at 6:51 AM ABCCDE921 wrote: > Because that does 2 passes over the entire array when you only need one > and there is no option to specify if you w

Re: Request for argmax(list) and argmin(list)

2021-09-01 Thread Calvin Spealman
If only there were a library that already provides exactly the functions you're asking for... 🤔 On Wed, Sep 1, 2021 at 9:54 AM ABCCDE921 wrote: > Because that does 2 passes over the entire array when you only need one > and there is no option to specify if you want the leftmost or rightmost > el

Re: Request for argmax(list) and argmin(list)

2021-09-01 Thread ABCCDE921
Because that does 2 passes over the entire array when you only need one and there is no option to specify if you want the leftmost or rightmost element On Wednesday, September 1, 2021 at 12:02:29 PM UTC+5:30, Paul Bryan wrote: > Why not: > > >>> l = [1, 3, 5, 9, 2, 7] > >>> l.index(max(l))

Re: Request for argmax(list) and argmin(list)

2021-09-01 Thread Peter Otten
On 01/09/2021 06:25, ABCCDE921 wrote: I dont want to import numpy argmax(list) returns index of (left most) max element >>> import operator >>> second = operator.itemgetter(1) >>> def argmax(values): return max(enumerate(values), key=second)[0] >>> argmax([1, 2, 3, 0]) 2 argm

Re: Request for argmax(list) and argmin(list)

2021-08-31 Thread Paul Bryan
Why not: >>> l = [1, 3, 5, 9, 2, 7] >>> l.index(max(l)) 3 >>> l.index(min(l)) 0 On Tue, 2021-08-31 at 21:25 -0700, ABCCDE921 wrote: > I dont want to import numpy > > argmax(list) >    returns index of (left most) max element > >  argmin(list) >    returns index of (left most) min element --

Request for argmax(list) and argmin(list)

2021-08-31 Thread ABCCDE921
I dont want to import numpy argmax(list) returns index of (left most) max element argmin(list) returns index of (left most) min element -- https://mail.python.org/mailman/listinfo/python-list

Re: basic auth request

2021-08-25 Thread Eli the Bearded
Cybersecurity#Dangling_markup_injection_vulnerability On 25 July 2016, Matthew Bryant showed that Comodo's website is vulnerable to dangling markup injection attacks and can send emails to system administrators from Comodo's servers to approve a wildcard certificate issue

Re: basic auth request

2021-08-25 Thread Barry
gt; ones you choose "please don't issue a certificate for my domain". >> By definition someone who had hacked a CA would pay no attention >> to that request, of course. > > Yeah, but it works for the case of forgotten hostnames, a rare but > real attack. Basically it

Re: basic auth request

2021-08-25 Thread Eli the Bearded
In comp.lang.python, Jon Ribbens wrote: > On 2021-08-25, Eli the Bearded <*@eli.users.panix.com> wrote: >> $COMPANY puts out a lot of things on different IP addresses from >> a shared public(ish) pool like AWS and assigns different names >> to them. Later $COMPANY discontinues one or more of thos

Re: basic auth request

2021-08-25 Thread Jon Ribbens via Python-list
se don't issue a certificate for my domain". >> By definition someone who had hacked a CA would pay no attention >> to that request, of course. > > Yeah, but it works for the case of forgotten hostnames, a rare but > real attack. Basically it works like this: > >

Re: basic auth request

2021-08-25 Thread Eli the Bearded
o had hacked a CA would pay no attention > to that request, of course. Yeah, but it works for the case of forgotten hostnames, a rare but real attack. Basically it works like this: $COMPANY puts out a lot of things on different IP addresses from a shared public(ish) pool like AWS and assigns

Re: basic auth request

2021-08-25 Thread Peter J. Holzer
On 2021-08-22 19:37:24 +1000, Chris Angelico wrote: > On Sun, Aug 22, 2021 at 6:45 PM Peter J. Holzer wrote: > > > > On 2021-08-22 05:04:43 +1000, Chris Angelico wrote: > > > On Sun, Aug 22, 2021 at 4:55 AM Martin Di Paola > > > wrote: > > > > HTTPS ensures encryption so the content, including th

Re: basic auth request

2021-08-25 Thread Jon Ribbens via Python-list
ase don't issue a certificate for my domain". >> By definition someone who had hacked a CA would pay no attention >> to that request, of course. > > True, but that would still prevent legit CAs from unwittingly > contributing to an attack. But it still wouldn't h

Re: basic auth request

2021-08-25 Thread Chris Angelico
arency", which to me seems to be a system very much based > on the "problem: horse gone; solution: shut stable door" principle. > > Another attempt at combatting this problem is DNS CAA records, > which are a way of politely asking all CAs in the world except the > ones

Re: basic auth request

2021-08-25 Thread Jon Ribbens via Python-list
Another attempt at combatting this problem is DNS CAA records, which are a way of politely asking all CAs in the world except the ones you choose "please don't issue a certificate for my domain". By definition someone who had hacked a CA would pay no attention to that request, of cours

Re: basic auth request

2021-08-25 Thread Chris Angelico
On Thu, Aug 26, 2021 at 12:16 AM Jon Ribbens via Python-list wrote: > > On 2021-08-25, Chris Angelico wrote: > > On Wed, Aug 25, 2021 at 5:20 PM Barry Scott wrote: > >> Only if this threat model matters to you or your organisation. > >> Personal its low down of the threats I watch out for. > >>

Re: basic auth request

2021-08-25 Thread Barry Scott
> On 22 Aug 2021, at 12:03, Chris Angelico wrote: > > On Sun, Aug 22, 2021 at 8:30 PM Barry Scott > wrote: >> >> >> >> On 22 Aug 2021, at 10:37, Chris Angelico wrote: >> >> When it comes to security, one thing I'm very curious about is why we >> don't have

Re: basic auth request

2021-08-25 Thread Jon Ribbens via Python-list
On 2021-08-25, Chris Angelico wrote: > On Wed, Aug 25, 2021 at 5:20 PM Barry Scott wrote: >> Only if this threat model matters to you or your organisation. >> Personal its low down of the threats I watch out for. >> >> The on-line world and the real-world are the same here. >> >> If a business ch

Re: basic auth request

2021-08-25 Thread Chris Angelico
On Wed, Aug 25, 2021 at 5:20 PM Barry Scott wrote: > > Only if this threat model matters to you or your organisation. > Personal its low down of the threats I watch out for. > > The on-line world and the real-world are the same here. > > If a business changes hands then do you trust the new owners

Re: basic auth request

2021-08-22 Thread Chris Angelico
On Sun, Aug 22, 2021 at 8:30 PM Barry Scott wrote: > > > > On 22 Aug 2021, at 10:37, Chris Angelico wrote: > > When it comes to security, one thing I'm very curious about is why we > don't have any sort of certificate renewal verification. My browser > could retain the certificates of some web si

Re: basic auth request

2021-08-22 Thread Barry Scott
> On 22 Aug 2021, at 10:37, Chris Angelico wrote: > > When it comes to security, one thing I'm very curious about is why we > don't have any sort of certificate renewal verification. My browser > could retain the certificates of some web site (or of all web sites, > even - they're not THAT lar

Re: basic auth request

2021-08-22 Thread Chris Angelico
On Sun, Aug 22, 2021 at 6:45 PM Peter J. Holzer wrote: > > On 2021-08-22 05:04:43 +1000, Chris Angelico wrote: > > On Sun, Aug 22, 2021 at 4:55 AM Martin Di Paola > > wrote: > > > HTTPS ensures encryption so the content, including the Basic Auth > > > username and password, is secret for any exte

Re: basic auth request

2021-08-22 Thread Peter J. Holzer
On 2021-08-22 05:04:43 +1000, Chris Angelico wrote: > On Sun, Aug 22, 2021 at 4:55 AM Martin Di Paola > wrote: > > > > While it is correct to say that Basic Auth without HTTPS is absolutely > > insecure, using Basic Auth *and* HTTPS is not secure either. > > > > Well, the definition of "secure" de

Re: basic auth request

2021-08-21 Thread Chris Angelico
On Sun, Aug 22, 2021 at 4:55 AM Martin Di Paola wrote: > > While it is correct to say that Basic Auth without HTTPS is absolutely > insecure, using Basic Auth *and* HTTPS is not secure either. > > Well, the definition of "secure" depends of your threat model. Yes. Which makes statements like "not

Re: basic auth request

2021-08-21 Thread Martin Di Paola
While it is correct to say that Basic Auth without HTTPS is absolutely insecure, using Basic Auth *and* HTTPS is not secure either. Well, the definition of "secure" depends of your threat model. HTTPS ensures encryption so the content, including the Basic Auth username and password, is secret

Re: basic auth request

2021-08-18 Thread Jon Ribbens via Python-list
On 2021-08-18, Robin Becker wrote: > On 17/08/2021 22:47, Jon Ribbens via Python-list wrote: > ... >> That's only true if you're not using HTTPS - and you should *never* >> not be using HTTPS, and that goes double if forms are being filled >> in and double again if passwords are being supplied

Re: basic auth request

2021-08-18 Thread Robin Becker
On 17/08/2021 22:47, Jon Ribbens via Python-list wrote: ... That's only true if you're not using HTTPS - and you should *never* not be using HTTPS, and that goes double if forms are being filled in and double again if passwords are being supplied. I think I agree with most of the replies;

Re: basic auth request

2021-08-17 Thread Jon Ribbens via Python-list
On 2021-08-17, Barry wrote: >> That's usually irrelevant, since the alternative is most likely to be >> form fill-out, which is exactly as secure. If you're serving over >> HTTPS, the page is encrypted, and that includes the headers; if you're >> not, then it's not encrypted, and that includes the

Re: basic auth request

2021-08-17 Thread Chris Angelico
On Wed, Aug 18, 2021 at 7:15 AM Barry wrote: > > > > > On 17 Aug 2021, at 19:25, Chris Angelico wrote: > > > > On Wed, Aug 18, 2021 at 4:16 AM Barry Scott wrote: > >> Oh and if you have the freedom avoid Basic Auth as its not secure at all. > >> > > > > That's usually irrelevant, since the alte

Re: basic auth request

2021-08-17 Thread Barry
> On 17 Aug 2021, at 19:25, Chris Angelico wrote: > > On Wed, Aug 18, 2021 at 4:16 AM Barry Scott wrote: >> Oh and if you have the freedom avoid Basic Auth as its not secure at all. >> > > That's usually irrelevant, since the alternative is most likely to be > form fill-out, which is exactl

Re: basic auth request

2021-08-17 Thread Chris Angelico
On Wed, Aug 18, 2021 at 4:16 AM Barry Scott wrote: > Oh and if you have the freedom avoid Basic Auth as its not secure at all. > That's usually irrelevant, since the alternative is most likely to be form fill-out, which is exactly as secure. If you're serving over HTTPS, the page is encrypted, an

Re: basic auth request

2021-08-17 Thread Barry Scott
On Tuesday, 17 August 2021 10:20:37 BST Robin Becker wrote: > While porting an ap from python2.7 to python3 I see this > > base64string = base64.b64encode('%s:%s' % (wsemail, wspassword)) > request.add_header("Authorization", "Basic %s" % base64string) > > in python3.x I find this wor

Re: basic auth request

2021-08-17 Thread Chris Angelico
On Wed, Aug 18, 2021 at 3:04 AM Robin Becker wrote: > > While porting an ap from python2.7 to python3 I see this > > base64string = base64.b64encode('%s:%s' % (wsemail, wspassword)) > request.add_header("Authorization", "Basic %s" % base64string) > > in python3.x I find this works

basic auth request

2021-08-17 Thread Robin Becker
While porting an ap from python2.7 to python3 I see this base64string = base64.b64encode('%s:%s' % (wsemail, wspassword)) request.add_header("Authorization", "Basic %s" % base64string) in python3.x I find this works base64string = base64.b64encode(('%s:%s' % (wsemail, w

Re: Post request and encoding

2020-11-03 Thread Hernán De Angelis
I see. Should be "encoding". Thanks. /H. On 2020-11-03 19:30, Dieter Maurer wrote: Hernán De Angelis wrote at 2020-11-2 10:06 +0100: ... My request has the form: header = {'Content-type':'application/xml', 'charset':'utf-8'} Not your probl

Re: Post request and encoding

2020-11-03 Thread Dieter Maurer
Hernán De Angelis wrote at 2020-11-2 10:06 +0100: > ... >My request has the form: > >header = {'Content-type':'application/xml', 'charset':'utf-8'} Not your problem (which you have already resolved) but: `charset` is not an individual header but

Re: Post request and encoding

2020-11-02 Thread Grant Edwards
On 2020-11-02, Ethan Furman wrote: > On 11/2/20 9:32 AM, Karsten Hilbert wrote: > >> because .encode() does not operate in-place. > > Yeah, none of the string operations do, and it's embarrassing how > many times that still bites me. :-/ I've been writing Python for a little over 20 years. In an

Re: Post request and encoding

2020-11-02 Thread Variable Starlight
Thanks, I now learned the lesson. 👍 Den mån 2 nov. 2020 18:58Ethan Furman skrev: > On 11/2/20 9:32 AM, Karsten Hilbert wrote: > > > because .encode() does not operate in-place. > > Yeah, none of the string operations do, and it's embarrassing how many > times that still bites me. :-/ > > -- > ~

Re: Post request and encoding

2020-11-02 Thread Variable Starlight
No worries ☺ Den mån 2 nov. 2020 19:05Karsten Hilbert skrev: > On Mon, Nov 02, 2020 at 06:43:20PM +0100, Hernán De Angelis wrote: > > > I see, my mistake was (tacitly) assuming that encode() could work in > place. > > > > Now I see that it should work in a previous line as you wrote. > > > > Tha

Re: Post request and encoding

2020-11-02 Thread Karsten Hilbert
On Mon, Nov 02, 2020 at 06:43:20PM +0100, Hernán De Angelis wrote: > I see, my mistake was (tacitly) assuming that encode() could work in place. > > Now I see that it should work in a previous line as you wrote. > > Thank you! Sure, and excuse my perhaps slightly terse tone in that earlier mail .

  1   2   3   4   5   6   7   8   9   10   >