On 11/27/2023 10:04 AM, Peter J. Holzer via Python-list wrote:
On 2023-11-25 08:32:24 -0600, Michael F. Stemper via Python-list wrote:
On 24/11/2023 21.45, avi.e.gr...@gmail.com wrote:
Of course, for serious work, some might suggest avoiding constructs like a
list of lists and switch to using
came from the Latin word for news. Be that as it
may, and I have no interest in this topic, in the future I may use the ever
popular names of Primus, Secundus and Tertius and get blamed for using
Latin.
-Original Message-
From: Python-list On
Behalf Of DL Neil via Python-list
Sent: Sunda
On Mon, 27 Nov 2023 at 13:52, AVI GROSS via Python-list
wrote:
> Be that as it
> may, and I have no interest in this topic, in the future I may use the ever
> popular names of Primus, Secundus and Tertius and get blamed for using
> Latin.
>
Imperious Prima flashes forth her edi
components of an object but verify the validity of the contents or do
logging or any number of other things. Using a list or tuple does nothing
else.
So if you need nothing else, they are often suitable and sometimes even
preferable.
-Original Message-----
From: Python-list On
Behalf Of D
On 2023-11-26, Dieter Maurer via Python-list wrote:
> If you do not have this case (e.g. usually if you open the file
> in a class's `__init__`), you do not use a context manager.
He knows that. The OP wrote that he wants to use that can
_only_ be used by a context manager, but he
On 2023-11-27, Grant Edwards via Python-list wrote:
> On 2023-11-26, Dieter Maurer via Python-list wrote:
>
>> If you do not have this case (e.g. usually if you open the file
>> in a class's `__init__`), you do not use a context manager.
>
> He knows that. The OP wro
On 27/11/23 9:03 am, Stefan Ram wrote:
Above, "have" is followed by another verb in "have been",
so it should be eligible for a contraction there!
Yes, "been" is the past participle of 'to be", so "I've been" is
fine.
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
er:
def __init__(self):
self.cm = device_open()
self.device = self.cm.__enter__()
# Other methods here for doing things with
# self.device
def close(self):
self.cm.__exit__(None, None, None)
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
s) does
say "hashable"!
So if you need nothing else, they are often suitable and sometimes even
preferable.
Yes, (make a conscious choice to) use the best tool for the job - but
don't let bias cloud your judgement, don't take the ideas of the MD's
nephew as 'Gospel', and DO design the way forward...
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
ferent modules and do not call `parse_args` themselves.
Any ideas appreciated,
Regards,
DG
--
https://mail.python.org/mailman/listinfo/python-list
On Mon, 27 Nov 2023 at 22:31, Dom Grigonis via Python-list
wrote:
>
> Hi all,
>
> I have a situation, maybe someone can give some insight.
>
> Say I want to have input which is comma separated array (e.g.
> paths='path1,path2,path3') and convert it to the desired o
ble.
Have to head out as this is already long enough.
-Original Message-
From: 'DL Neil'
Sent: Monday, November 27, 2023 2:49 AM
To: avi.e.gr...@gmail.com; python-list@python.org
Subject: Re: Newline (NuBe Question)
Avi,
On 11/27/2023 4:15 PM, avi.e.gr...@gmail.com wrote:
&g
to have a class
where the device is opened in the __init__()
and used in some methods.
Any ideas?
bye,
--
piergiorgio
--
https://mail.python.org/mailman/listinfo/python-list
except Exception as e:
print(f"Error: {e}")
finally:
# Close the SSH connection
ssh.close()
if __name__ == "__main__":
run_scripts()
i used this but i am unable to know what ip address to use?
--
https://mail.python.org/mailman/listinfo/python-list
).
Note, YOUR program must now make sure that the __exit__ function is called, and
handle any exceptions that got thrown, and that ob and var are put somewhere
you can access them at that later time.
> On Nov 27, 2023, at 12:24 PM, Piergiorgio Sartor via Python-list
> wrote:
>
> O
).
Note, YOUR program must now make sure that the __exit__ function is called, and
handle any exceptions that got thrown, and that ob and var are put somewhere
you can access them at that later time.
> On Nov 27, 2023, at 12:24 PM, Piergiorgio Sartor via Python-list
> wrote:
>
> O
il.python.org/mailman/listinfo/python-list
On 11/27/23 04:29, Dom Grigonis via Python-list wrote:
Hi all,
I have a situation, maybe someone can give some insight.
Say I want to have input which is comma separated array (e.g.
paths='path1,path2,path3') and convert it to the desired output - list:
import argpa
ats Wichmann via Python-list
> wrote:
>
> On 11/27/23 04:29, Dom Grigonis via Python-list wrote:
>> Hi all,
>> I have a situation, maybe someone can give some insight.
>> Say I want to have input which is comma separated array (e.g.
>> paths='path1,path2,pat
the
base Action class's initializer with the rest of the args
super().__init__(option_strings=option_strings, *args, **kwargs)
Hopefully someone else has done this kind of thing because now I'm just
guessing!
--
https://mail.python.org/mailman/listinfo/python-list
gs, **kwargs)
>
> Hopefully someone else has done this kind of thing because now I'm just
> guessing!
>
>
--
https://mail.python.org/mailman/listinfo/python-list
ultdict.
>
> from collections import defaultdict
>
> dic = defaultdict(lambda:'NULL')
> dic['foo'] = 'astring'
> dic['foo']
> 'astring'
> dic['bar']
> 'NULL'
>
> Duncan
>
I have gone with the 'd.get' solution, as I am just need to print the
dict to the terminal. The dict is actually from a list of dicts which
is generated by querying a database, so I don't think the defaultdict
approach would be so appropriate, but it's good to know about it.
Thanks,
Loris
--
This signature is currently under constuction.
--
https://mail.python.org/mailman/listinfo/python-list
DL Neil writes:
> On 11/25/2023 3:31 AM, Loris Bennett via Python-list wrote:
>> Hi,
>> I want to print some records from a database table where one of the
>> fields contains a JSON string which is read into a dict. I am doing
>> something like
>>
les-across-modules-from-user-defined-config-file
I think I could probably get that to work, but are there any better
alternatives?
Cheers,
Loris
--
This signature is currently under constuction.
--
https://mail.python.org/mailman/listinfo/python-list
return s, n
--8<---cut here---end--->8---
--
https://mail.python.org/mailman/listinfo/python-list
def powers_of_2_in(n):
s = 0
while n % 2 == 0:
s += 1
n = n // 2
return s, n
> On 30 Nov 2023, at 02:44, Julieta Shem via Python-list
> wrote:
>
> How would you write this procedure?
>
> --8<---cut here---start---
On 2023-11-29 at 21:44:01 -0300,
Julieta Shem via Python-list wrote:
> How would you write this procedure?
>
> --8<---cut here---start->8---
> def powers_of_2_in(n):
> s = 0
> while "I still find factors of 2 in n...":
&g
Julieta Shem writes:
How would you write this procedure?
def powers_of_2_in(n):
...
def powers_of_2_in(n):
return (n ^ (n - 1)).bit_count() - 1
--
https://mail.python.org/mailman/listinfo/python-list
nted to
see if I could use the terminfo stuff directly to retain
use of regular input() and print() functions.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
--
https://mail.python.org/mailman/listinfo/python-list
otos/alangauldphotos
--
https://mail.python.org/mailman/listinfo/python-list
g on Flickr at:
http://www.flickr.com/photos/alangauldphotos
--
https://mail.python.org/mailman/listinfo/python-list
You can let itertools.groupy find the groups.
max((len(tuple(group)), key) for key, group in itertools.groupby(s))
# (4, 'c')
--
https://mail.python.org/mailman/listinfo/python-list
importing
that and waiting as they all load.
-Original Message-
From: Python-list On
Behalf Of Ethan Furman
Sent: Thursday, January 14, 2021 2:36 PM
To: python-list@python.org
Subject: Re: why sqrt is not a built-in function?
On 1/14/21 11:06 AM, Eli the Bearded wrote:
> "There shoul
n than
shouting at newsgroups. Perhaps juggling balls?
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
--
https://mail.python.org/mailman/listinfo/python-list
hout requiring the user to type input between prints?
Or what parameter should I be setting where?
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
--
https://mail.python.org/mailman/listinfo/python-list
com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
--
https://mail.python.org/mailman/listinfo/python-list
On 14/01/2021 16:12, Alan Gauld via Python-list wrote:
> #
> import curses as cur
> cur.setupterm()
>
> bold = cur.tigetstr('bold')
> cls = cur.tigetstr('clear')
>
> cur.putp(cls)
> name = input("Hello, what's your name?
c.
Do you know where that is documented? I'd be interested in
reading more.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
--
https://mail.python.org/mailman/listinfo/python-list
On 15/01/2021 21:41, Dennis Lee Bieber wrote:
> On Fri, 15 Jan 2021 13:19:26 +, Alan Gauld via Python-list
> declaimed the following:
>
>> So the native C functions work as expected.
>> Why does the Python wrapper not?
>
> Are you running Python from a p
e the terminfo functions come in and, as you
saw from the C code, are fairly trivial to use in C.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
--
https://mail.python.org/mailman/listinfo/python-list
On 18/01/2021 22:14, Random832 wrote:
> On Fri, Jan 15, 2021, at 13:36, Alan Gauld via Python-list wrote:
>> That could make a big difference, the putp() function specifically
>> states that it writes to stdout.
>
> I think there is a reasonable argument that this is a defici
ly fond of Winduhs.
--
Mladen Gogala
Database Consultant
http://mgogala.byethost5.com
--
https://mail.python.org/mailman/listinfo/python-list
.
Running out of memory is an OS error and should be checked on the OS
level.
--
Mladen Gogala
Database Consultant
http://mgogala.byethost5.com
--
https://mail.python.org/mailman/listinfo/python-list
Cygwin version is typically much easier and
more natural.
--
Mladen Gogala
Database Consultant
https://dbwhisperer.wordpress.com
--
https://mail.python.org/mailman/listinfo/python-list
g/mailman/listinfo/python-list
something to
match another by repeatedly copying the same sequence as many times as
needed. If a generator finishes, you want it to restart with the same
sequence until you stop asking.
This is just a thought, not a request for such a feature.
-Original Message-
From: Python-list On
Behalf
at is it scanning?
> >
> > > My favorite (I'm using now) is VS Code with Python extension,
> > > it's very
> > > light. Recently also started background scanning, but that's
> > > generally
> > done
> > > in 30 seconds.
> >
> > Same question, what is it scanning?
> >
> > --
> > Grant
> >
> > --
> > https://mail.python.org/mailman/listinfo/python-list
> >
--
https://mail.python.org/mailman/listinfo/python-list
t:
http://www.flickr.com/photos/alangauldphotos
--
https://mail.python.org/mailman/listinfo/python-list
tp://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
--
https://mail.python.org/mailman/listinfo/python-list
however, remains your brain.
Amen to that, regardless of any software tool used.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
--
https://mail.python.org/mailman/listinfo/python-list
cises. However anytime we are
given an assignment in Python and I download, it doesn't open in Python.
How can I lunch Python on my PC and secondly how can I open Python files on my
PC.
Thank you.
David
--
https://mail.python.org/mailman/listinfo/python-list
.
--
https://mail.python.org/mailman/listinfo/python-list
On 27/01/2021 18:32, flaskee via Python-list wrote:
>
> While print() is groovy and all,
> if anyone runs across a non-pdb python debugger (standalone or IDE-based)
> please let me know.
>
There are many. But why must it be non-pdb? That seems rather arbitrary.
Or do you really
before too. But this is the
message I get.
And yes, i have checked, the input tag is the only tag with that class name, so
there isn´t another tag which selenium could´ve interacted with.
regards, me.
--
https://mail.python.org/mailman/listinfo/python-list
?
Can someone help me please? Thank you
--
https://mail.python.org/mailman/listinfo/python-list
uldphotos
--
https://mail.python.org/mailman/listinfo/python-list
. It worked fine. Then, I
typed it into my shell and got an error. Why is it working in the command
prompt but not in the actual shell?
--
https://mail.python.org/mailman/listinfo/python-list
.
You can decode it as utf-8 and ignore the BOM character, or as someone
else has rightly said, Python can decode it as utf-8-sig, which does
that automatically for you.
--
https://mail.python.org/mailman/listinfo/python-list
10. helmik. 2021 klo 5.10 Martin Lopez (mmllopezmar...@gmail.com)
kirjoitti:
> Where do I inquire about installation support?
> --
> https://mail.python.org/mailman/listinfo/python-list
>
--
https://mail.python.org/mailman/listinfo/python-list
ke 10. helmik. 2021 klo 5.07 Terry Reedy (tjre...@udel.edu) kirjoitti:
> On 2/9/2021 9:55 AM, Philipp Daher via Python-list wrote:
> > Hello,
> >
> > I’ve just typed „pip install selenium“ into my command prompt on windows
> 10. Although my computer told me that the
yet follows the expected rules as if it was being interpreted.
But a more pleasant attitude may make the same points, not that I am sure what
those are and what is being asked. It sounds more like being told.
-Original Message-
From: Python-list On
Behalf Of Mr Flibble
Sent: Thursday
https://mail.python.org/mailman/listinfo/python-list
.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
--
https://mail.python.org/mailman/listinfo/python-list
lickr at:
http://www.flickr.com/photos/alangauldphotos
--
https://mail.python.org/mailman/listinfo/python-list
vice would be to ditch Idle
and use VSCode. It's fabulous.
--
Mladen Gogala
Database Consultant
https://dbwhisperer.wordpress.com
--
https://mail.python.org/mailman/listinfo/python-list
thing will cause delays in others and so on.
Obviously, beyond the scope but my point is they do not necessarily operate
in one pass over the list and are quite a bit more complex.
-Original Message-
From: Python-list On
Behalf Of Dan Stromberg
Sent: Saturday, February 13, 2021 2:13
rogram web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
--
https://mail.python.org/mailman/listinfo/python-list
scussion.
-Original Message-
From: Python-list On
Behalf Of Mr Flibble
Sent: Saturday, February 13, 2021 7:07 PM
To: python-list@python.org
Subject: Re: New Python implementation
On 13/02/2021 18:11, Alan Gauld wrote:
> On 13/02/2021 16:09, Mr Flibble wrote:
>> On 13/02/2021 00:0
,
'DB_TYPE_ROWID', 'DB_T
...
>>> conn=cx_Oracle.Connection("scott/tiger@ora19c")
>>>
Please use PSYCOPG2 instead of cx_Oracle. After you do it
from python3 interpreter do it from Idle:
On Sat, 13 Feb 2021 22:08:11 +
tional
compiled language like C.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
--
https://mail.python.org/mailman/listinfo/python-list
.
--
https://mail.python.org/mailman/listinfo/python-list
On 15/02/2021 02:26, Avi Gross via Python-list wrote:
> I think we have discussed this a few times.
Indeed, many times!
And there is a natural tendency for a group focused on a
programming language to fixate on language improvements. But
it's worth while to back up and look at re
perience groups.
-Original Message-----
From: Python-list On
Behalf Of Grant Edwards
Sent: Monday, February 15, 2021 4:00 PM
To: python-list@python.org
Subject: Re: New Python implementation
On 2021-02-15, Roel Schroeven wrote:
> Is it your intention to not only compile procedural and
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
--
https://mail.python.org/mailman/listinfo/python-list
.. a little.
I am not sure I agree that a language like Scheme or Logo or Brainfuck, with
their small number of building blocks, would be harder to learn.
To me, Python is the lego boxes from the early 2000s, where there were so many
specialized pieces that you felt that the original design might as well be the
only design.
Regards,
Tarjei
--
https://mail.python.org/mailman/listinfo/python-list
my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
--
https://mail.python.org/mailman/listinfo/python-list
l Message-
From: Python-list On
Behalf Of Christian Gollwitzer
Sent: Tuesday, February 16, 2021 2:25 AM
To: python-list@python.org
Subject: Re: New Python implementation
Am 15.02.21 um 21:37 schrieb Roel Schroeven:
>
> So your claim is that your compiler is able to, or will be able to,
&g
then be the
optimal choice.
- Tarjei Bærland
PS: I can't remember in what context I visited it, but thanks for an
inspiring site.
--
https://mail.python.org/mailman/listinfo/python-list
sure what quite what my feelings are regarding this,
perhaps Python is the best of all possible options.
- Tarjei
Note, I am emphatically saying this in the context of a maths class.
--
https://mail.python.org/mailman/listinfo/python-list
t were handed in and
returned a day later, or having to wait a long time for a compile to complete,
with errors.
--
https://mail.python.org/mailman/listinfo/python-list
then.io/2014/01/01/how-tcp-backlog-works-in-linux.html
<http://veithen.io/2014/01/01/how-tcp-backlog-works-in-linux.html>
Humbly,
Karen
--
https://mail.python.org/mailman/listinfo/python-list
> On Feb 17, 2021, at 12:25 AM, Karen Shaeffer via Python-list
> wrote:
>
>
>
>> On Feb 16, 2021, at 8:10 PM, Jason Friedman wrote:
>>
>>>
>>> I set listen(2) and expect to see "error" when more clients than "the
>>> ma
for now.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
--
https://mail.python.org/mailman/listinfo/python-list
On 16/02/2021 21:22, Tarjei Bærland via Python-list wrote:
> To me, it depends on what you want out of including programming in
> mathematics education.
That's a really important subclass distinction.
If programming is seen as an adjunct to math then the aims
can be simplified conside
make hard things easy.
Just a thought. Admittedly it is hard these days to give a homework
assignment when the student can find a trivial way to get the result and not
do the hard work.
-Original Message-----
From: Python-list On
Behalf Of Dennis Lee Bieber
Sent: Thursday, February 18, 2021 1
Hi,I am trying to install Scipy but it failed, I have python 3.9. I need
your assistance with that.
Thank you Mustafa Althabit8133825988
--
https://mail.python.org/mailman/listinfo/python-list
lickr at:
http://www.flickr.com/photos/alangauldphotos
--
https://mail.python.org/mailman/listinfo/python-list
om/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
--
https://mail.python.org/mailman/listinfo/python-list
lly if you came to python from another language
that method was borrowed from or vice versa. Being a rich language has pro's
and cons. LISP only had cons.
-Original Message-----
From: Python-list On
Behalf Of Alan Gauld via Python-list
Sent: Friday, February 19, 2021 6:23 AM
To: python-
plus or
minus depending.
(cons "A" (cons "v" (cons "I" nil)))
-----Original Message-
From: Python-list On
Behalf Of Benjamin Schollnick
Sent: Friday, February 19, 2021 1:31 PM
To: Michael F. Stemper
Cc: python-list@python.org
Subject: Re: New Python imple
photos
--
https://mail.python.org/mailman/listinfo/python-list
ED that some search
and research suggested other advanced methods they might use on the job
later, sure, maybe they get extra credit.
-Original Message-
From: Python-list On
Behalf Of Grant Edwards
Sent: Saturday, February 20, 2021 12:31 PM
To: python-list@python.org
Subject: Re: Is there
s for, now that
it seems you may have a bigger purpose? Or, is it HW for a more advanced
class?
-Original Message-
From: Python-list On
Behalf Of C W
Sent: Sunday, February 21, 2021 9:21 AM
To: Python
Subject: Re: Is there a way to subtract 3 from every digit of a number?
I do want to fo
advice or actual code that zoomed in one how to do it to a series. You clearly
saw it.
-Original Message-
From: Python-list On
Behalf Of Chris Angelico
Sent: Sunday, February 21, 2021 9:41 AM
Cc: Python
Subject: Re: Is there a way to subtract 3 from every digit of a number?
On Mon
above is not meant to be efficient and I could do better if I take more
than a few minutes but is straightforward and uses the vectorized approach
so no obvious loops are needed.
-Original Message-
From: Python-list On
Behalf Of C W
Sent: Sunday, February 21, 2021 9:48 AM
To: Chris Angelico
Cc:
tp://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
--
https://mail.python.org/mailman/listinfo/python-list
. Unclicking
anything in this case may not be enough and perhaps the code should clear
all other items too. Clicking on any one, should mark all of them. So not
really a simple subset of the cases.
And what messages does a user get as they use the control?
-Original Message-
From: Python-list
just a category that could be doable.
-Original Message-----
From: Python-list On
Behalf Of Chris Angelico
Sent: Thursday, February 25, 2021 1:14 AM
To: Python
Subject: Re: name for a mutually inclusive relationship
On Thu, Feb 25, 2021 at 4:06 PM Avi Gross via Python-list
wrote:
>
> Is
n G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
--
https://mail.python.org/mailman/listinfo/python-list
2501 - 2600 of 5713 matches
Mail list logo