On Wed, 10 Apr 2024 at 18:51, WordWeaver Evangelist via Python-list
wrote:
> I have a simple question. I use the following textPrompt in some of my
> Jython modules:
> '\n [1;33mYour choice is? (A B C D E): ', maxChars=1, autoAccept=False,
> forceUppercase=True)
> Is there a way to add an
> I *must* do:
>
> with device_open() as device:
>device.do_something()
>
> Nevertheless, I _need_ to have a class
> where the device is opened in the __init__()
> and used in some methods.
>
> Any ideas?
Perhaps take a look at contextlib.ExitStack and see if you can do something
with it.
Hello All!
I'd like to inform you that FlaskCon 2023 is currently calling for
proposals, and you are invited to submit.
*Submission Details:*
Deadline: 31st Oct
Submit Your Proposal: https://flaskcon.com/
Any submissions would be greatly appreciated.
Best regards,
*David Carmichael
In article ,
David Dalton wrote:
> cODINg :-)
Since Odin is described as the Sky Father, I think he
is the one I call Cosma, not the one I call Gwydion
or the avatar type who was the author of Havamal 138--141.
c I take to represent light.
g I take to represent gravity.
--
ht
Hi,
I recently have been experiencing issues with the pip installation module.
I have python version 3.11 installed. I've checked the directory installed
in the systems variables window and nothing is amiss. Kindly assist.
Regards,
David
--
https://mail.python.org/mailman/listinfo/python-list
Not sure if I'm fully understanding the question. But one option instead of
making everything class attributes is to just define __getattr__ for when it
doesn't find an attribute.
Won't work for every single valid section and option name (because of spaces,
name overlaps, etc) but should cover
I believe your problem is __rsub__, not __sub__.
When you havethen that
uses the "r" version of the operators.
In your __rsub__ (used when you have - ) you instead return
- which is backwards.
Notice how the final return should also be -4,95 and not the +4,95 it's
returning.
> If on
> Then I'm very confused as to how things are being done, so I will shut
> up. There's not enough information here to give performance advice
> without actually being a subject-matter expert already.
Short version: In this specific case "weights" is a 5,147 element list of
floats, and "input" is
> Or use the sum() builtin rather than reduce(), which was
> *deliberately* removed from the builtins. The fact that you can get
> sum() without importing, but have to go and reach for functools to get
> reduce(), is a hint that you probably shouldn't use reduce when sum
> will work.
Out of
On 22:43 Sat 04 Mar 2023, Dino wrote:
How can I implement this? A library called Whoosh seems very promising
(albeit it's so feature-rich that it's almost like shooting a fly with
a bazooka in my case), but I see two problems:
1) Whoosh is either abandoned or the project is a mess in terms of
> I wrote my previous message before reading this. Thank you for the test you
> ran -- it answers the question of performance. You show that re.finditer is
> 30x faster, so that certainly recommends that over a simple loop, which
> introduces looping overhead.
>> def
> Find 6-letter words that are hidden (embedded) within each row of letters.
> The letters are in the correct order.
>
> 1. JSOYOMFUBELR
> 2. SCDUARWDRLYE
> 3. DASNAGEFERTY
> 4. CLULOOTSCEHN
> 5. USENEARSEYNE
> The letters are in the correct order.
On Thu, 26 Jan 2023 at 04:24, Jach Feng wrote:
> Chris Angelico 在 2023年1月25日 星期三下午1:16:25 [UTC+8] 的信中寫道:
> > On Wed, 25 Jan 2023 at 14:42, Jach Feng wrote:
> > You're still not really using argparse as an argument parser. Why not
> > just do your own -h checking? Stop trying to use argparse for
On Wed, 25 Jan 2023 at 12:19, Mike Baskin via Python-list
wrote:
> Will all of you please stop sending me emails
Hi. We don't have the power to do that.
Because this is a public list, which works by
people adding and removing themselves.
You, or perhaps someone messing with you,
added your
On Mon, 16 Jan 2023 at 16:15, Dino wrote:
> BTW, can you tell me what is going on here? what's := ?
>
> while (increase := add_some(conn,adding)) == 0:
See here:
https://docs.python.org/3/reference/expressions.html#assignment-expressions
https://realpython.com/python-walrus-operator/
--
tests against
nonuniform PRNGs had already been done somewhere.
--
David Lowry-Duda
--
https://mail.python.org/mailman/listinfo/python-list
On Mon, Dec 05, 2022 at 10:37:39PM -0300, Sabrina Almodóvar wrote:
The Python Paradox
Paul Graham
August 2004
[SNIP]
Hence what, for lack of a better name, I'll call the Python paradox:
if a company chooses to
Inspired by the recent thread about pseudorandom number generators on
python-ideas (where I also mistakenly first wrote this message), I began
to wonder: suppose that I had a pseudorandom number generator that
attempted to generate a nonuniform distribution. Suppose for instance
that it was to
On Tue, 8 Nov 2022 at 03:08, ICT Ezy wrote:
> Please explain how to generate different output in following logical
> operations
> >>> 0 and True
> 0
> >>> 0 or True
> True
> >>> 1 and True
> True
> >>> 1 or True
> 1
Hi,
The exact explanation of how 'and' and 'or' behave can be read here:
One can use the `dis` module and investigate the generated python
bytecode. For me, I get
# file "dis1.py"
thing = 123
for i in range(10):
if "hi" == str(thing):
print("found")
break
The bytecode is then
1 0 LOAD_CONST 0 (123)
2
On Tue, Oct 11, 2022 at 12:32:23PM -0700, SquidBits _ wrote:
Does anyone else think there should be a flatten () function, which just turns
a multi-dimensional list into a one-dimensional list in the order it's in. e.g.
[[1,2,3],[4,5,6,7],[8,9]] becomes [1,2,3,4,5,6,7,8,9].
I have had to
seems to mitigate this problem by introducing the asyncio.Runner()
context-manager. But for the time being for 3.10, I see no good solution.
Best regards,
--
David Jander
--
https://mail.python.org/mailman/listinfo/python-list
On Sat, 20 Aug 2022 at 04:31, Chris Angelico wrote:
> What's the best way to precisely reconstruct an HTML file after
> parsing it with BeautifulSoup?
> Note two distinct changes: firstly, whitespace has been removed, and
> secondly, attributes are reordered (I think alphabetically). There are
From: Dennis Lee Bieber
>
> On Wed, 17 Aug 2022 12:09:14 -0600, David at Booomer
> declaimed the following:
>
>> executables=[
>> Executable(
>>
>> "prjui.py","Maiui.py","about.py","dict.py
y I
had search for __init__() which returned no lines due to the closing ).
I had visited the page you provided
(https://cx-freeze.readthedocs.io/en/latest/setup_script.html#cx-freeze-executable)
but didn’t noticed the 11 plus self as 12 arguments.
Thanks again for any suggestions.
David
> From
has self.
Thanks, David
> On Aug 15, 2022, at 5:51 PM, Jim Schwartz wrote:
>
> This link covers how to use BDist_dmg.
>
> https://cx-freeze.readthedocs.io/en/latest/setup_script.html
>
> Sent from my iPhone
>
>> On Aug 15, 2022, at 12:11 PM, David at Booo
the command: python setup.py build gives much the same error.
I believe there is an issue specifying the output file name but don’t know how
to resolve it.
Any suggestions, thanks. David
--
https://mail.python.org/mailman/listinfo/python-list
>> But, an easier and often
>> better option for concurrent data access is use a (relational)
>> database, then the appropriate transaction isolation levels
>> when reading and/or writing.
>>
>
> That would obviusly save some coding (but would introduce the need to
> code the interaction with the
So after a long while I'm finally getting around to upgrading to 3.10 on
Windows from 3.9, and my first pip upgrade is causing issues with the
installation.
Problem seems to be that I run pip from a command prompt in the Scripts folder,
and it seems pip is trying to completely remove the
On Tue, Jul 19, 2022 at 03:58:41PM +0200, Antoon Pardon wrote:
I am writing a python package which has the following structure
PACKAGE
* module1.py
* module2.py
* data.cfg
However the data.cfg should be build at installation time.
Can someone give advise on which packaging tool and
Please don't use all caps in the subject line. It comes across as if
you're yelling at the list --- this doesn't make people want to be more
helpful.
Instead, use meaningful, specific subject headers. Also, please be
precise and informative about what your problem is. It's not clear what
you
On Friday, June 24, 2022 at 11:36:06 AM UTC-4, Mats Wichmann wrote:
> On 6/23/22 07:14, Richard David wrote:
> > Is there a new scheduled date for releasing 3.11.0b4? Are there issues with
> > b4 that have implications for b3?
> >
> > I realize it will be released w
On Thursday, June 23, 2022 at 9:15:19 AM UTC-4, Richard David wrote:
> Is there a new scheduled date for releasing 3.11.0b4? Are there issues with
> b4 that have implications for b3?
>
> I realize it will be released when ready and am not trying to push or harass
> anyone in
I will say is that
doesn't feel like a very appealing use of my time.
On Thu, Jun 23, 2022 at 9:42 AM Avi Gross wrote:
> David,
>
> I am curious why you are undertaking the effort to take a language already
> decades old and showing signs of being a tad rusty into a language
> that s
Is there a new scheduled date for releasing 3.11.0b4? Are there issues with b4
that have implications for b3?
I realize it will be released when ready and am not trying to push or harass
anyone involved. It just seems that versions are usually released on schedule
so I'm wondering if there's
>> Let's say they reimplement "reference python" CPython in Rust. What is
>> better? Change the "reference python" CPython name to RPython, for
>> example, or let it as CPython?
>The C implementation would still be called CPython, and the new
>implementation might be called RPython, or
On Tue, 21 Jun 2022 at 09:22, Wolfgang Grafen wrote:
> I am an experienced Python user and struggle with following statement:
>
> >>> from tklib import *
> Traceback (most recent call last):
> File "", line 1, in
> ModuleNotFoundError: No module named 'tklib'
[...]
> I did not find a python
Why am I not getting debug output on my windows 10 machine:
C:\temp>\Windows\py.exe -0
-V:3.11 *Python 3.11 (64-bit)
-V:3.10 Python 3.10 (64-bit)
C:\temp>set PYLAUNCH_DEBUG=1
C:\temp>\Windows\py.exe
Python 3.11.0b3 (main, Jun 1 2022, 13:29:14) [MSC v.1932 64 bit (AMD64)] on
>>def TempsOneDay(*dateComponents):
>>if len(dateComponents) == 3:
>>year, month, date = dateComponents
>>elif len(dateComponents) == 1 and isinstance(dateComponents[0],
>> datetime.date):
>>year, month, date = (dateComponents[0].year, dateComponents[0].month,
>>
>> I have a function that I use to retrieve daily data from a
>> home-brew database. Its calling sequence is;
>>
>> def TempsOneDay( year, month, date ):
>>
>> After using it (and its friends) for a few years, I've come to
>> realize that there are times where it would be advantageous to
>>
Change by David Goncalves :
--
nosy: +dpg
nosy_count: 8.0 -> 9.0
pull_requests: +30340
pull_request: https://github.com/python/cpython/pull/32279
___
Python tracker
<https://bugs.python.org/issu
Change by David Goncalves :
--
nosy: +dpg
nosy_count: 9.0 -> 10.0
pull_requests: +30316
pull_request: https://github.com/python/cpython/pull/32245
___
Python tracker
<https://bugs.python.org/issu
Change by David Goncalves :
--
nosy: +dpg
nosy_count: 6.0 -> 7.0
pull_requests: +30282
pull_request: https://github.com/python/cpython/pull/32207
___
Python tracker
<https://bugs.python.org/issu
Change by David Foster :
--
nosy: +David Foster
___
Python tracker
<https://bugs.python.org/issue47087>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from David Robertson :
Originally written up at the typeshed repo:
https://github.com/python/typeshed/issues/7513. The conclusion was that this is
a bug in the implementation rather than an incorrect annotation.
To my surprise, I discovered in
https://github.com/matrix-org
New submission from David M. :
Awaiting multiple times on a single task that failed with an exception results
in an unbounded increase in memory usage. Enough repeated "await"s of the task
can result in an OOM.
The same pattern on a task that didn't raise an exception behaves a
R. David Murray added the comment:
The policy is named 'default' because it was intended to become the default two
feature releases after the new email code became non-provisional (first:
deprecate not specifying an explicit policy, next release make default the
default policy and make
> Hi.I am learning python and I am working with some netCDF files.
> Suppose I have temperature data from 1950-2020 and I want data for
> only 1960-2015. How should I extract it. --
Alternately, use https://unidata.github.io/netcdf4-python/ or gdal.
It might also be possible to read
> Is there a simpler way?
>>> d = {1: ['aaa', 'bbb', 'ccc'], 2: ['fff', 'ggg']}
>>> [a for b in d.values() for a in b]
['aaa', 'bbb', 'ccc', 'fff', 'ggg']
>>>
--
https://mail.python.org/mailman/listinfo/python-list
PS C:\Users\Nepapa David\cpims_api> pip install -r requirements/base.txt
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020.
Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will
drop support
for Python 2.7 in January 2021. More details ab
New submission from David CARLIER :
Exposing more flags for direct calls, shutil fastcopy still only using
COPYFILE_DATA one.
--
components: Library (Lib)
messages: 413137
nosy: devnexen
priority: normal
pull_requests: 29459
severity: normal
status: open
title: posix._fcopyfile flags
New submission from David Castells-Rufas :
If I create a class derived from ast.NodeTransformer and implement the
visit_Call.
When run on the below code, the visit_Call function is only called once (for
the print function, and not for ord). It looks like calls in function arguments
New submission from David CARLIER :
Adding Linux's SO_INCOMING_CPU constant for setsockopt.
--
components: +Library (Lib)
keywords: +patch
message_count: None -> 1.0
pull_requests: +29407
stage: -> patch review
title: socketmodule add Linux SO_INCOMING_CPU constasn -> socketm
Change by David CARLIER :
--
nosy: devnexen
priority: normal
severity: normal
status: open
title: socketmodule add Linux SO_INCOMING_CPU constasn
___
Python tracker
<https://bugs.python.org/issue46
> l1=['a','b','c']
> l2=['j','k','l']
>
> I want to build a string like this
> "foo a j, b k, c l bar"
> Is it possible to achieve this with f strings or any other
> simple/efficient way?
Here is a small list of things that want to be done (and natural ways to
perform them)
1. pair items in
New submission from David CARLIER :
- sendfile on solaris supports copy between regular file descriptors as well.
--
components: Library (Lib)
messages: 412643
nosy: devnexen
priority: normal
pull_requests: 29338
severity: normal
status: open
title: shutil Lib enables sendfile
Change by David Foster :
--
nosy: +David Foster
___
Python tracker
<https://bugs.python.org/issue46475>
___
___
Python-bugs-list mailing list
Unsubscribe:
David Contreras added the comment:
I disabled the default ^space in macOS settings>Keyboard>Shortcuts>Input
Sources>Select the Previous input source (^space)
After doing that ^space works on IDLE, nonetheless the menu shows ^S which is
not ^space.
--
Added
Change by David Contreras :
--
assignee: -> terry.reedy
components: +IDLE
nosy: +terry.reedy
type: -> behavior
versions: +Python 3.10, Python 3.9
___
Python tracker
<https://bugs.python.org/i
R. David Murray added the comment:
Yeah, I think we need a complete example here.
Note that in the general case there is no such thing as an RFC-valid email in
unicode (which is what python strings are), though with utf8=True and an email
involving only text you might get away with it. I
New submission from David Contreras :
I noticed that selecting Edit>Show Completions works as expected on Python
3.10.2 and macOS 12.1 after issue 40128 was resolved.
But trying the default keyboard shortcut ctrl+S only highlights the edit menu
but doesn't work.
I understand that i
Change by David Mc Dougall :
--
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue46071>
___
___
Pyth
Change by David Mc Dougall :
--
nosy: -dam1784
___
Python tracker
<https://bugs.python.org/issue46466>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from David Mc Dougall :
My inline comment ('#') got picked up by the help command.
Write the following code to a file (I named it "reproducer.py"):
"""
class Foo:
# Hello docstring, I'm a '#' comment!
def bar(self):
pass
assert Foo
Change by David Mc Dougall :
--
resolution: -> wont fix
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by David Mc Dougall :
--
nosy: -dam1784
___
Python tracker
<https://bugs.python.org/issue46071>
___
___
Python-bugs-list mailing list
Unsubscribe:
David Mc Dougall added the comment:
> It seems David places more value on the idea of the concrete mapping
> "pointing forwards" with respect to the abstract directed graph, while it
> seems Tim places more value on the idea of the abstract mapping direction
> corr
David Mc Dougall added the comment:
No, the code works fine. I just wish the docs weren't so muddled.
I wish the docs started by saying:
> The graph is a dict of {'start_node': ['end_nodes',]}
> The topological sorter puts the end_nodes before their start_nodes.
[note: this i
David Mc Dougall added the comment:
I can post literally hundreds of examples of directed graphs that are
traversable in the forward direction. This might be the only one which is
*only* traversable backwards.
> As to the meaning of "point to"
Here is one: If I have a pointer
David Mc Dougall added the comment:
> you're not actually confused.
I was when I first read it!
> the meanings of "predecessor" and "successor" are universally agreed upon
I disagree. The universally agreed upon terms are "directed edge u -> v"
David Mc Dougall added the comment:
> The argument passed is the predecessor form of the graph B -> A
where graph = {'A' : ['B']}
This is part that I'm objecting to. The form of the graph should be A -> B, not
B -> A.
The issue with the current form is that you can not traver
David Mc Dougall added the comment:
> If the way the user collects their data stores only successor links (which,
> as above, seems odd in applications that actually use topsorts), then they
> need something like this instead:
Actually they only need to do this:
ts = Topologi
David Mc Dougall added the comment:
The "reverse-toposort" is actually quite a good idea. The end-user is usually
going to want to iterate over the sorted output in the "reverse" order anyways,
especially if they're doing task ordering / dependency resolution.
Also, the
R. David Murray added the comment:
The general idea is that the string version of the header should contain all of
the original information, but the parsed elements (the things returned by
special header attributes) will contain the valid data, if any. So if the
string version
R. David Murray added the comment:
Note that the parser does attempt to accept obsolete syntax (registering
defects for it), so if there is a bug in the implementation of the obsolete
syntax handling it should be fixed. And yes, there have been other bugs with
whitespace handling
David Lord added the comment:
Meant to say that "done" shows up on the same line, not the shell prompt. An
earlier version of my example was in the REPL, where its prompt *does* show up
on the same line.
--
___
Python track
David Lord added the comment:
I can reproduce this on Python 3.10.
Actually, `input` and `getpass` both seem to have this behavior now. Please
reopen it.
```python
import getpass
try:
getpass.getpass("in: ")
except:
pass
print("done")
```
```
$ python example
New submission from David CARLIER :
- Adding shm_rename (from FreeBSD 13) to be able to move a shared memory block
from one location to another.
--
___
Python tracker
<https://bugs.python.org/issue46
Change by David CARLIER :
--
components: FreeBSD
nosy: devnexen, koobs, vstinner
priority: normal
pull_requests: 28825
severity: normal
status: open
title: posixshmem module shm_rename freebsd support.
type: enhancement
___
Python tracker
<ht
David Goncalves added the comment:
Any core developers available to review this PR?
--
___
Python tracker
<https://bugs.python.org/issue33178>
___
___
Python-bug
Change by David CARLIER :
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue46357>
___
___
Python-bugs-list
David CARLIER added the comment:
I get what you mean now I thought memset was enough.
--
___
Python tracker
<https://bugs.python.org/issue46357>
___
___
Pytho
David CARLIER added the comment:
I took as initialized to avoid undefined behavior rather than anything.
--
___
Python tracker
<https://bugs.python.org/issue46
New submission from David CARLIER :
- Solves the "Make sure new member of socket address initialized." warning for
the bluetooth sockaddr_l2cap usage.
--
components: FreeBSD
messages: 410419
nosy: devnexen, koobs
priority: normal
pull_requests: 28761
severity: normal
st
Change by David :
--
assignee: docs@python
components: Documentation
nosy: davem, docs@python
priority: normal
pull_requests: 28731
severity: normal
status: open
title: duplicate paragraphs - asyncio Coroutines and Tasks file
versions: Python 3.10
R. David Murray added the comment:
Note also that datetime.now() gives you a naive datetime. From an API
consistency standpoint I think it makes sense that datetime.utcnow() gives a
naive datetime. It would actually be confusing (IMO) for it to return an aware
datetime. I can see why you
New submission from David CARLIER :
Adding SF_NOCACHE and little note for SF_MNOWAIT.
--
components: FreeBSD
messages: 409465
nosy: devnexen, koobs
priority: normal
pull_requests: 28542
severity: normal
status: open
title: posixmodule sendfile FreeBSD's constants update
versions
New submission from David Fritz :
I believe this also impacts 3.10 and 3.11 based on the original bpo-45401 which
led to this change. Prior to commit ac421c348b in the 3.9 branch there were no
additional os.path checks in the shouldRollover() methods of
RotatingFileHandler
Change by David Mc Dougall :
--
keywords: +patch
pull_requests: +28515
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30269
___
Python tracker
<https://bugs.python.org/issu
New submission from David Mc Dougall :
The graphlib documentation has some grammar & phrasing issues.
--
components: Library (Lib)
messages: 409370
nosy: dam1784
priority: normal
severity: normal
status: open
title: Graphlib documentation (general cleanup)
type: enhancement
vers
Change by David Mc Dougall :
--
title: Graphlib documentation -> Graphlib documentation (edge direction)
___
Python tracker
<https://bugs.python.org/issu
Change by David CARLIER :
--
components: Library (Lib)
nosy: devnexen
priority: normal
pull_requests: 28473
severity: normal
status: open
title: mmap module add MAP_STACK constant mostly for OpenBSD
versions: Python 3.11
___
Python tracker
<ht
New submission from David Bereza :
Documentation link:
https://docs.python.org/3/library/logging.config.html#configuration-file-format
It seems that the example for the "formatter_form01" formatter section
specifies following for the style(please note the single-quotes around
Change by David Mc Dougall :
--
pull_requests: +28446
pull_request: https://github.com/python/cpython/pull/30223
___
Python tracker
<https://bugs.python.org/issue46
New submission from David Gilbertson :
On this page: https://docs.python.org/3/library/io.html#text-encoding it says
"there is no concrete plan as of yet, Python may change the default text file
encoding to UTF-8 in the future".
On this page https://docs.python.org/3/library/os
Change by David Hewitt :
--
keywords: +patch
pull_requests: +28438
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30217
___
Python tracker
<https://bugs.python.org/issu
New submission from David Hewitt :
The limited api methods `PyBuffer_GetPointer`, `PyBuffer_FromContiguous`,
`PyBuffer_ToContiguous` and `PyMemoryView_FromBuffer` take buffer arguments as
`Py_buffer *`.
They do not mutate the buffer info, so could simply take `const Py_buffer
New submission from David Mc Dougall :
The documentation for graphlib encourages users to represent their graphs in a
awkward format.
Graphs are currently represented using dictionaries of nodes, for example:
graph["end_node"] = ["start_node"]
And this is unintuitive b
New submission from haven david :
Opportunity for you to transform into interesting characters like Mario,
Sonic...
Online game with exciting battles
https://super-smashflash2.com
--
components: Build
messages: 408519
nosy: havenhaven
priority: normal
severity: normal
status: open
Change by David Peled :
--
nosy: +david-peled
___
Python tracker
<https://bugs.python.org/issue45959>
___
___
Python-bugs-list mailing list
Unsubscribe:
1 - 100 of 17927 matches
Mail list logo