t has nothing to do with the protocol.
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
Hi,
I learned to use virtual environments where ever possible, and I learned to pip
install the required packages there.
That works quite nice at home. Now I come to deploy a Python script on a debian
linux server, making it usable for a couple of users there.
Debian (or even Python3 itself
Den 2024-10-15 skrev MRAB :
> On 2024-10-15 21:16, Martin Schöön via Python-list wrote:
>> Some years ago I created a Python program that reads GPS data and
>> It is the second to last line that throws an error:
>>
>> l.set_data(x0, y0)
>>
>> The error m
Den 2024-10-15 skrev Stefan Ram :
> Martin =?UTF-8?Q?Sch=C3=B6=C3=B6n?= wrote or quoted:
>>l.set_data(x0, y0)
>
> Well, I got to say, it's pretty rad that you're rocking Python!
> That language is the bee's knees, for real.
>
> As for your que
On 9/23/24 22:51, Dan Sommers via Python-list wrote:
On 2024-09-23 at 19:00:10 +0100,
Barry Scott wrote:
On 21 Sep 2024, at 11:40, Dan Sommers via Python-list
wrote:
But once your code gets big the disciple of using classes helps
maintenance. Code with lots of globals is problematic
Den 2024-10-16 skrev Stefan Ram :
> Martin =?UTF-8?Q?Sch=C3=B6=C3=B6n?= wrote or quoted:
>>Me rocking Python?
>
>|to rock
>|1. To use. To make do with, usually to great effect.
>|"You don't need to make up the guest bed; we can rock the couch."
> Urban Di
On 16/10/2024 22:47, rbowman wrote:
On 16 Oct 2024 08:20:10 GMT, Martin Schöön wrote:
Den 2024-10-15 skrev Stefan Ram :
Martin =?UTF-8?Q?Sch=C3=B6=C3=B6n?= wrote or
quoted:
l.set_data(x0, y0)
Well, I got to say, it's pretty rad that you're rocking Python!
That language is
].
Regards,
Vinay Sajip
[1] https://pypi.org/project/distlib/0.3.9/
[2]
https://distlib.readthedocs.io/en/latest/overview.html#change-log-for-distlib
[3] https://github.com/pypa/distlib/issues/new/choose
--
https://mail.python.org/mailman/listinfo/python-list
Op 23/09/2024 om 09:44 schreef Annada Behera via Python-list:
The "next-level math trick" Newton-Raphson has nothing to do with
functional programming. I have written solvers in purely iterative
style.
What is your point. Any problem solved in a functional style can
also be solved
generators to give you as many primes as you want, and
no more.
So, if you can store arbitrary python code as part of your JSON, you can
send quite a bit of somewhat compressed data.
The real problem is how the JSON is set up. If you take umpteen data
structures and wrap them all in something like
r overflowing. And yet
somehow, the universe never collapsed.
If you believe that some implementation of fsync fails to meet a
specification, or fails to work correctly on files containign JSON, then
file a bug report.
--
https://mail.python.org/mailman/listinfo/python-list
ad of collecting the
whole list first.
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
reexisting Event may be supplied.
Return a 2-tuple of `(T,E)`.
'''
if E is None:
E = Event()
T = Thread(target=target, args=[E, *a], kwargs=kw)
return T, E
Something along those lines.
Cheers,
Cameron Simpson
--
https://mail.python.org/mailman/listinfo/python-list
an aspect ratio for the lips to conclude they are moving
significantly? Is the mentioned function able to tell whether the lips
are significantly moving while the mouth is closed?
--
https://mail.python.org/mailman/listinfo/python-list
Just make a shared virtualenv, eg in /usr/local or /opt somewhere.
Have the script commence with:
#!/path/to/the/shred/venv/bin/python
and make it readable and executable.
Problem solved.
Cheers,
Cameron Simpson
--
https://mail.python.org/mailman/listinfo/python-list
> whereas I am quite sure that program flows do not overlap.
You can never be sure of this in Python. Virtually all objects in
Python are allocated on heap, so instantiating integers, doing simple
arithmetic etc. -- all of this requires synchronization because it
will allocate memory for a sha
nce is futile!...Acceptance is versatile..."
--
https://mail.python.org/mailman/listinfo/python-list
thub.com/bit-team/backintime/issues/1911#issuecomment-2436851901>
--
https://mail.python.org/mailman/listinfo/python-list
the issue might exist because of a combination of 3 factors:
shutil.rmtree(), PyFakeFS in a chroot/mock build environment.
[1] --
<https://github.com/bit-team/backintime/blob/c1d042ab67b9e117ac53e944518a0f4292fa075b/common/test/test_uniquenessset.py#L45>
--
https://mail.python.org/mailman/listinfo/python-list
Am 25.10.2024 09:06 schrieb Christian Buhtz via Python-list:
On a "regular" system all tests are running.
To clarify: "regular" does not exclude PyFakeFS. It means on my own
local development machine and on the TravsCI machines (Ubuntu 22 with
Python 3.9 up to 3.13) a
os.close(dirfd)
return
if func is os.rmdir:
os.rmdir(name, dir_fd=dirfd)
return
# Note: To guard against symlink races, we use the standard
# lstat()/open()/fstat() trick.
assert func is os.lstat
E AssertionError
/usr/lib64/python3.13/shutil.py:663: AssertionError
--
https://mail.python.org/mailman/listinfo/python-list
From reading the code where the exception is coming from, this is how
I interpret the intention of the author: they build a list (not sure
why they used list, when there's a stack datastructure in Python)
which they use as a stack, where the elements of the stack are
4-tuples, the important
On 2024-10-24 at 20:54:53 +0100,
MRAB via Python-list wrote:
> On 2024-10-24 20:21, Left Right wrote:
> > > > > The stack is created on line 760 with os.lstat and entries are
> > > > > appended
> > > > > on lines 677 (os.rmdir), 679 (os.close) a
ng the interpreter to
import the same module multiple times, but if that was possible (which
in principle it is), then it would explain the behavior.
--
https://mail.python.org/mailman/listinfo/python-list
assigned the open file handle
to `contents`, but passed `content` (with no "s") to `chardet.detect` -
so the result would depend on whatever was previously assigned to `content`.
{'encoding': 'Windows-1252', 'confidence': 0.7282676610947401, 'langua
ke 23. lokak. 2024 klo 20.11 Albert-Jan Roskam via Python-list (
[email protected]) kirjoitti:
>Today I used chardet.detect in the repl and it returned windows-1252
>(incorrect, because it later resulted in a UnicodeDecodeError). When I
> ran
>chardet as a script
On 10/27/24 16:51, o1bigtenor via Python-list wrote:
Greetings
There are mountains of books out there.
Any suggestions for documents for a just learning how to program and
starting with Python (3)?
Preference to a tool where I would be learning by doing - - - that
works well for me.
TIA
On 2024-10-29, Loris Bennett wrote:
> Hi,
>
> With Python 3.9.18, if I do
>
> try:
> with open(args.config_file, 'r') as config_file:
> config = configparser.ConfigParser()
> config.read(config_file)
> print(c
Hi,
With Python 3.9.18, if I do
try:
with open(args.config_file, 'r') as config_file:
config = configparser.ConfigParser()
config.read(config_file)
print(config.sections())
i.e try to read the configuration with the variable defined
On 01Nov2024 08:11, Loris Bennett wrote:
Cameron Simpson writes:
If you're using the Python email module to parse (or construct) the
message as a `Message` object I'd expect that to happen automatically.
I am using
email.message.EmailMessage
Noted. That seems like the correct a
dy Unicode text (i.e. a regular
Python string with the original text, unencoded). And to print that.
--
https://mail.python.org/mailman/listinfo/python-list
On 11/1/24 08:32, [email protected] wrote:
...
After the recent upgrades I had to install youtube_dl with pipx for the
new python version.
When I ran the script which imported youtube_dl, I got an import error
as it appears the path to the module
was not in sys.path
I see at several
still have access to `body` ? That would be the original
> message text? Otherwise maybe:
>
> print(mail.get_content())
>
> The objective is to obtain the message body Unicode text (i.e. a
> regular Python string with the original text, unencoded). And to print
>
problem which I can't handle is to handle the Frame which
seems to be needed to place the Scrollbar somewhere.
Best regards
Ulrich
--
Ulrich Goebel
--
https://mail.python.org/mailman/listinfo/python-list
Inada Naoki writes:
> 2024年11月2日(土) 0:36 Loris Bennett via Python-list :
>
>> Left Right writes:
>>
>> > There's quite a lot of misuse of terminology around terminal / console
>> > / shell. Please, correct me if I'm wrong, but it looks like you ar
On 04/11/2024 15:32, Ulrich Goebel via Python-list wrote:
> I would like to build a class ScrolledListbox,
I assume like the one that used to be available via the Tix module?
It's a great shame that Tix is gone, it had a lot of these useful
widgets, but they were all wrappers around
def config(self, *a, **kw):
return self.Listbox.config(*a, **kw)
and so forth for the various listbox methods you want to proxy to the
listbox itself. You could pass scroll specific methods to the scrollbar
as well.
Cheers,
Cameron Simpson
--
https://mail.python.org/mailman/listinfo/p
n is: What conversion is necessary in order to print the
>>>>EmailMessage object to the terminal, such that the quoted-printable
>>>>parts are turned (back) into UTF-8?
>>>
>>> Do you still have access to `body` ? That would be the original
>>>
could populate your list box and then put it inside
that frame. I’ve not tested this scenario, so I’d appreciate feedback!
Thanks.
On 4 Nov 2024, at 21:28, Ulrich Goebel via Python-list
wrote:
Hi,
I would like to build a class ScrolledListbox, which can be packed
uch that the quoted-printable
>>>parts are turned (back) into UTF-8?
>>
>> Do you still have access to `body` ? That would be the original
>> message text? Otherwise maybe:
>>
>> print(mail.get
L.S.,
Python seem to suffer from a few poor design decisions regarding strings
and lists that affect the elegance of the language.
(a) An error-prone "feature" is returning -1 if a substring is not found
by "find", since -1 currently refers to the last item. An example:
rs,
Cameron Simpson
--
https://mail.python.org/mailman/listinfo/python-list
ld be
> len(s) - 1 (no laziness!).
>
I'm not sure if this answers your objection but the note in the
documentation (https://docs.python.org/3/library/stdtypes.html#str.find)
says:
The find() method should be used only if you need to know the position of
sub.
I think the use case above is a little bit different.
--
https://mail.python.org/mailman/listinfo/python-list
On 05Nov2024 15:48, Raymond Boute wrote:
Python seem to suffer from a few poor design decisions regarding
strings and lists that affect the elegance of the language.
(a) An error-prone "feature" is returning -1 if a substring is not
found by "find", since -1 currently ref
ld specify this dependency in
pyproj.toml via
[tool.poetry.dependencies]
python = "^3.6"
first-package = "^1.6.0"
However, if I do that and then attempt to install the second package, I
get the error
Could not find a version that satisfies the requirement
first-package<2.0
e(name)?
The ConfigParser module provides read(), read_file(), read_string(),
and read_dict() methods. I think they were just trying to be
comprehensive. It's a bit non-Pythonic really.
--
https://mail.python.org/mailman/listinfo/python-list
Jon Ribbens writes:
> On 2024-10-29, Loris Bennett wrote:
>> Hi,
>>
>> With Python 3.9.18, if I do
>>
>> try:
>> with open(args.config_file, 'r') as config_file:
>> config = configparser.ConfigParser()
>&
or stream?
Well, sure - any time it's not being read from a file. A bit ironic
that the method to use in that situation is "read_file", of course.
In my view the read() and read_file() methods have their names the
wrong way round. But bear in mind this code is 27 years old, and
the read() function came first.
--
https://mail.python.org/mailman/listinfo/python-list
a common situation might I be obliged to use
'read_file'? I.e. is there some common case where the file name is not
available, only a corresponding file-like object or stream?
--
This signature is currently under constuction.
--
https://mail.python.org/mailman/listinfo/python-list
ncoding to UTF-8 permanently:
https://superuser.com/questions/269818/change-default-code-page-of-windows-console-to-utf-8
, which, I believe, will solve your problem with how the text is
displayed.
On Thu, Oct 31, 2024 at 5:19 PM Loris Bennett via Python-list
wrote:
>
> Hi,
>
> I have a command
the salutation
> text provided by the "salutation server" and the mail body from a file
> are encoded. This seems to be different.
>
>> Your terminal probably accepts UTF-8 - I imagine other German text
>> renders corectly?
>
> Yes, it does.
>
>> You n
splayed.
I'm not using MS Windows. I am using a Gnome terminal on Debian 12
locally and connecting via SSH to a AlmaLinux 8 server, where I start a
tmux session.
> On Thu, Oct 31, 2024 at 5:19 PM Loris Bennett via Python-list
> wrote:
>>
>> Hi,
>>
>> I have a command-l
rminal probably accepts UTF-8 - I imagine other German text
> renders corectly?
Yes, it does.
> You need to get the text and undo the quoted-printable encoding.
>
> If you're using the Python email module to parse (or construct) the
> message as a `Message` object I'd expect
ded with `quoted-printable`.
Maybe, you do not need to pass `cte`?
--
https://mail.python.org/mailman/listinfo/python-list
> ...
>After the recent upgrades I had to install youtube_dl with pipx for the
>new python version.
>When I ran the script which imported youtube_dl, I got an import error
>as it appears the path to the module
>was not in sys.path
I see at several options:
* install `
On 31Oct2024 21:53, [email protected] wrote:
On 31/10/2024 20:50, Cameron Simpson via Python-list wrote:
If you're just dealing with this directly, use the `quopri` stdlib
module: https://docs.python.org/3/library/quopri.html
One of the things I love about this list are these l
nyways, OP said they were using an actual terminal (emulator) on
Ubuntu, and it looks like their problem is more with extracting
information from the email message rather than with the terminal
capabilities. Also, looks like there was an answer already wrt.
message.get_body()
--
https://mail.python.org/mailman/listinfo/python-list
On 2024-11-01, Eli the Bearded <*@eli.users.panix.com> wrote:
> In comp.lang.python, Gilmeh Serda wrote:
>> Python 3.12.6 (main, Sep 8 2024, 13:18:56) [GCC 14.2.1 20240805] on linux
>> Type "help", "copyright", "credits" or "license&quo
Try PYTHONUTF8=1 envver.
2024年11月2日(土) 0:36 Loris Bennett via Python-list :
> Left Right writes:
>
> > There's quite a lot of misuse of terminology around terminal / console
> > / shell. Please, correct me if I'm wrong, but it looks like you are
> > print
homas Passin via Python-list:
On 10/25/2024 12:25 PM, marc nicole via Python-list wrote:
Hello Python fellows,
I hope this question is not very far from the main topic of this list, but
I have a hard time finding a way to check whether audio data samples are
containing empty noise or actual signi
Hello Python fellows,
I hope this question is not very far from the main topic of this list, but
I have a hard time finding a way to check whether audio data samples are
containing empty noise or actual significant voice/noise.
I am using PyAudio to collect the sound through my PC mic as follows
f you omit your "try ... except FileNotFoundError`
(or start the `except` clause with a `raise`), you
will learn where in the code the exception has been raised
and likely as well what was not found (Python is quite good
with such error details).
Actually, file-not-found is pretty well de
On Tue, 12 Nov 2024 at 01:59, Loris Bennett via Python-list
wrote:
> 2. In terms of generating a helpful error message, how should one
>distinguish between the config file not existing and the log file not
>existing?
By looking at the exception's attributes rather than ass
Dear Jeff,
writes:
> Dear Python Users Group,
>
>
>
> I am currently learning Python. I am blind and use the JAWS screen reader to
> assist me. I am trying to use Python's IDLE editor but find it quite
> challenging. When I move my cursor to a line of code, it reads
On 11/8/2024 2:09 PM, dn via Python-list wrote:
On 8/11/24 14:40, Mild Shock via Python-list wrote:
Well you can use your Browser, since
JavaScript understand post and pre increment:
Question: are we talking Python or JavaScript?
So we have x ++ equals in Python:
Trying to find a word
nted anywhere and I'm interested to know if
anyone can cast any light on it.
Thanks
--
https://mail.python.org/mailman/listinfo/python-list
og file not
existing?
Cheers,
Loris
--
This signature is currently under constuction.
--
https://mail.python.org/mailman/listinfo/python-list
Poor error reporting is a very common problem in programming. Python
is not anything special in this case. Of course, it would've been
better if the error reported what file wasn't found. But, usually
these problems are stacking, like in your code. Unfortunately, it's
yo
u omit your "try ... except FileNotFoundError`
(or start the `except` clause with a `raise`), you
will learn where in the code the exception has been raised
and likely as well what was not found (Python is quite good
with such error details).
> ...
>My questions are:
>
>1. Should I b
er of NVDA, which is itself written in python, and not a jaws
user, so you might do better to ask some of the other people in that
context - general blind programmer's mailing list:
https://www.freelists.org/list/program-l
And, the pythonvis blind python programmer's maili
As you can see in the linked issue it seems it was an incompatibility
between the version of Python and PyFakeFS.
In the end it was a Fedora packaging bug because that pyfakefs version
was not compatible with Python 3.13.
Thanks in advance for helping out.
--
https://mail.python.org/mailman
ead 1
assert func is os.lstat # thread 1 (failure!)
The only question is: is it possible to modify os.lstat like that, and
if so, how?
Other alternatives include a malfunctioning "is" operator,
malfunctioning module cache... all those are a lot less likely.
--
https://mail.python.org/mailman/listinfo/python-list
nted that the reference to os.lstat *can* be modified in
this way.
But, before we keep guessing any further, it'd be best if OP could get
us the info on what's stored in "func" and "os.lstat" at the time the
assertion fails.
--
https://mail.python.org/mailman/listinfo/python-list
On 10/25/2024 12:25 PM, marc nicole via Python-list wrote:
Hello Python fellows,
I hope this question is not very far from the main topic of this list, but
I have a hard time finding a way to check whether audio data samples are
containing empty noise or actual significant voice/noise.
I am
On 12/11/2024 08:52, Loris Bennett via Python-list wrote:
Cameron Simpson writes:
Generally you should put a try/except around the smallest possible
piece of code.
That is excellent advice.
Best wishes
Rob Cliffe
So:
config = configparser.ConfigParser()
try
Chris Angelico writes:
> On Tue, 12 Nov 2024 at 01:59, Loris Bennett via Python-list
> wrote:
>> 2. In terms of generating a helpful error message, how should one
>>distinguish between the config file not existing and the log file not
>>existing?
>
>
Am Tue, Nov 12, 2024 at 09:52:31AM +0100 schrieb Loris Bennett via Python-list:
> Regarding your example above, if 'missingfile.py' contains the following
>
> import configparser
>
> config = configparser.ConfigParser()
>
> try:
> config.read('
On Wed, 13 Nov 2024 at 07:29, Mats Wichmann via Python-list
wrote:
>
> On 11/12/24 12:10, Left Right via Python-list wrote:
>
> > Finally, if you want your logs to go to a file, and currently, your
> > only option is stderr, your shell gives you a really, really simple
&
eason it has to
lose data.
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
Op 12/11/2024 om 20:10 schreef Left Right via Python-list:
> I am not entirely convinced by NB2. I am, in fact, a sort of sysadmin
> person and most of my programs write to a log file. The programs are
> also moderately complex, so a single program might access a database,
> q
On 11/12/24 12:10, Left Right via Python-list wrote:
Finally, if you want your logs to go to a file, and currently, your
only option is stderr, your shell gives you a really, really simple
way of redirecting stderr to a file. So, really, there aren't any
excuses to do that.
an awful l
le {args.config_file} not found.
>>> Exiting.")
>>
>>Do not replace full error information (including a traceback)
>>with your own reduced error message.
>>If you omit your "try ... except FileNotFoundError`
>>(or start the `except` clause with a
Chris Angelico writes:
> On Tue, 12 Nov 2024 at 01:59, Loris Bennett via Python-list
> wrote:
>> 2. In terms of generating a helpful error message, how should one
>>distinguish between the config file not existing and the log file not
>>existing?
>
>
Left Right writes:
> Poor error reporting is a very common problem in programming. Python
> is not anything special in this case. Of course, it would've been
> better if the error reported what file wasn't found. But, usually
> these problems are stacking, like in you
your logs to go to a file, and currently, your
only option is stderr, your shell gives you a really, really simple
way of redirecting stderr to a file. So, really, there aren't any
excuses to do that.
--
https://mail.python.org/mailman/listinfo/python-list
l.python.org/mailman/listinfo/python-list
t, or an HTTP request, or from a database.
It is good practice in general to provide a method that allows your
class to read data as a stream, if that is appropriate for what
you're doing, so that people aren't unnecessarily forced to load
data fully into memory or write it to a file, as well as perhaps a
convenience method thaat will read from a named file for people who
are doing that.
--
https://mail.python.org/mailman/listinfo/python-list
/This announcement is in German since it targets a local user
group//meeting in Düsseldorf, Germany/
Ankündigung
Python Meeting Herbst Sprint 2024
<https://www.meetup.com/python-meeting-dusseldorf/events/303528848/> in
Düsseldorf <http://www.duesseldorf.de/>
Samstag, 09.11
--
This signature is currently under constuction.
--
https://mail.python.org/mailman/listinfo/python-list
Am Thu, Oct 31, 2024 at 07:47:17AM +0100 schrieb Loris Bennett via Python-list:
> However I didn't make myself clear: I understand that there are
> different functions, depending on whether I have a file name or a
> stream. Nevertheless, I just can't think of a practical exam
dd such endpoint? If so, how?
Cheers,
Loris
--
This signature is currently under constuction.
--
https://mail.python.org/mailman/listinfo/python-list
functions, depending on whether I have a file name or a
stream. Nevertheless, I just can't think of a practical example where I
might just have *only* a stream, especially one containing my
configuration data. I was just interested to know if anyone can give an
example.
--
This signature is currently under constuction.
--
https://mail.python.org/mailman/listinfo/python-list
and undo the quoted-printable encoding.
If you're using the Python email module to parse (or construct) the
message as a `Message` object I'd expect that to happen automatically.
If you're just dealing with this directly, use the `quopri` stdlib
module: https://docs.pytho
On 31/10/2024 20:50, Cameron Simpson via Python-list wrote:
> That looks to me like quoted-printable. This is an encoding for binary
> transport of text to make it robust against not 8-buit clean
...
> If you're just dealing with this directly, use the `quopri` stdlib
&
FYI: I am retired programmer using a recent upgrade to ubuntu 24.04 and
python 3.12
My needs are that of a hobbyist at this time. I am on a single user home
desktop with root privileges available.
After the recent upgrades I had to install youtube_dl with pipx for the
new python version.
When
t;Error: configuration file {args.config_file} not found.
>>> Exiting.")
>>
>>Do not replace full error information (including a traceback)
>>with your own reduced error message.
>>If you omit your "try ... except FileNotFoundError`
>>(or start the `exce
Hi,
Debian Linux seems to love Python 3.7 - that is shown by apt-get list, and it's
installed on my Debian Server.
But I need at least Python 3.8
Is there a repository which I can give to apt to get Python 3.8 or later?
Or do I really have to install and compile these versions manually
Python 3.7 is part of Buster (Debian old old stable)
If you moved to Debian bullseye you would get offered 3.9 (old stable)
Currently the stable version (Bookworm) would give you 3.11
I am not aware of anyone maintaining a repo for old Debian versions to get
newer Python versions. But I know in
> On 21 Sep 2024, at 11:40, Dan Sommers via Python-list
> wrote:
>
> Despite the fact that "everything is an object" in Python, you don't
> have to put data or functions inside classes or objects. I also know
> nothing about Typer, but there's noth
On 2024-09-21 at 06:38:05 +0100,
Barry via Python-list wrote:
> > On 20 Sep 2024, at 21:01, Loris Bennett via Python-list
> > wrote:
> >
> > Hi,
> >
> > Apologies if the following description is to brief - I can expand if no
> > one knows what I
5901 - 6000 of 6733 matches
Mail list logo