I am clearly one of the troglodytes referred to in recent discussions around
the PSF. I've been around in python land
for far too long, my eyesight fails etc etc.
I feel strongly that a miscarriage of justice has been made in the 3-month banning of a famous python developer from
some are
On 8/11/24 07:42, Schimon Jehudah via Python-list wrote:
Barry. Thomas. I agree.
I do not have his machine to make observations, and therefore this
report is obscured.
I want to solve an issue of a friend who has attempted to install
Slixfeed, which is based on OMEMO, and the installation has
Barry. Thomas. I agree.
I do not have his machine to make observations, and therefore this
report is obscured.
I want to solve an issue of a friend who has attempted to install
Slixfeed, which is based on OMEMO, and the installation has failed.
I have asked him to install python-omemo and he
Hiya, I'm using the sims 4 mod constructor by Zerbu, and when saving I'm
getting these error codes.
I'm going around in circles trying to figure out what is causing it, and I'm
stuck!
Can you help please?
Thank you.
Errors:
There was an error compiling the generated Pyt
On 08Aug2024 21:55, Gilmeh Serda wrote:
I guess in a sense Py2 was smarter figuring out what whent where and
where
it came from. Or it was a bad hack that has been removed.
No, Python 2 offered less control.
--
https://mail.python.org/mailman/listinfo/python-list
On 07Aug2024 08:35, Tobiah wrote:
When I do the same import with python3, I get:
Traceback (most recent call last):
File "/home/toby/me", line 1, in
import rcs.dbi
File "/usr/regos-1.0/lib/python/rcs/dbi/__init__.py", line 1, in
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
Greetings,
I'm gruntled to announce that magic-wormhole 0.15.0 is released.
Magic Wormhole is a Python library and CLI tool to securely get
arbitrary data from one computer to another using short, one-time,
human- pronouncable codes and e
On Thu, 8 Aug 2024 at 03:40, Tobiah via Python-list
wrote:
> The one under rcs.dbi contains:
>
> from dbi import *
> from regos import *
>
You probably want these to be package-relative now:
from .dbi import *
from .regos import *
Or, since you're using names
I believe you will need to track the modules in the folder *dbi *in the
root file '__init__.py'.
So there's an alternative to use the statement __all__ in the root filet
__init__.py, check the link where I find a use case:
*https://sentry.io/answers/what-is-init-py-for-i
aceback (most recent call last):
File "/home/toby/me", line 1, in
import rcs.dbi
File "/usr/regos-1.0/lib/python/rcs/dbi/__init__.py", line 1, in
from dbi import *
ModuleNotFoundError: No module named 'dbi'
What's changed, and how d
Python 3.12.5 is now available:
https://www.python.org/downloads/release/python-3125/
This is the fifth maintenance release of Python 3.12
Python 3.12 is the newest major release of the Python programming language,
and it contains many new features and optimizations. 3.12.5 is the latest
On Tue, Aug 6, 2024 at 10:53 AM Bill Deegan
wrote:
> I’m not looking through all the packages you have installed
>
> (Ctrl-F is your friend - - - )
> What version of python is installed on your system?
>
> There are actually 3 versions installed - - - which is why the who
> On 6 Aug 2024, at 02:49, Piper McCorkle via Python-list
> wrote:
>
> $ /tmp/sources/Python-3.12.4/configure --enable-shared --with-system-expat
> --enable-optimizations --prefix=
I assume that you must provide a value for --prefix. The linux default would be
--pre
> On 6 Aug 2024, at 07:11, aotto1968 via Python-list
> wrote:
>
> I know but I use a thread like a process because the "conversation" between
> the threads is done by my
> software. a Thread is usually faster to startup (thread-pool) this mean for
> high-lo
On 06.08.24 04:34, Grant Edwards wrote:
On 2024-08-05, aotto1968 via Python-list wrote:
Is it possible to run two completely independent Python interpreters
in one process, each using a thread?
By independent, I mean that no data is shared between the
interpreters and thus the C API can be
On 06.08.24 02:32, Lawrence D'Oliveiro wrote:
On Mon, 5 Aug 2024 23:19:14 +0200, aotto1968 wrote:
Is it possible to run two completely independent Python interpreters in
one process, each using a thread?
By independent, I mean that no data is shared between the interpreters
and thus the
I’m not looking through all the packages you have installed
What version of python is installed on your system?
On Tue, Aug 6, 2024 at 5:24 AM o1bigtenor wrote:
>
>
> On Mon, Aug 5, 2024 at 10:36 PM Bill Deegan
> wrote:
>
>> why reply to me instead of to the li
ys happening. I did apologize and
asked
you to advise in the next one whether you even wanted to be included (which
you haven't
responded to).
>
>
> Do you have any python 3 installed on your system?
> Or python 2.7?
> If not, can you install such via system package?
Hi!
I'm working on a Linux From Scratch sort of system, and part of that is
bootstrapping Python. I'm running into an error message in the compilation
though - could anyone help me with next steps on troubleshooting the error?
Error:
> ./_bootstrap_python /tmp/sources/Python-3.
why reply to me instead of to the list?
It's generally considered bad form to do so.
Do you have any python 3 installed on your system?
Or python 2.7?
If not, can you install such via system package?
-Bill
On Mon, Aug 5, 2024 at 6:06 PM o1bigtenor wrote:
>
>
> On Mon, Au
On Tue, 6 Aug 2024 at 08:48, aotto1968 via Python-list
wrote:
>
> hi,
>
> Is it possible to run two completely independent Python interpreters in one
> process, each using a thread?
>
> By independent, I mean that no data is shared between the interpreters and
> th
On 2024-08-05, aotto1968 via Python-list wrote:
> Is it possible to run two completely independent Python interpreters
> in one process, each using a thread?
>
> By independent, I mean that no data is shared between the
> interpreters and thus the C API can be used without any ot
hi,
Is it possible to run two completely independent Python interpreters in one
process, each using a thread?
By independent, I mean that no data is shared between the interpreters and thus the C API can be used without any other
"lock/GIL" etc.
mfg
--
https://mail.python.o
Did Mats suggestion of:
python3.13 -m venv new_venv
$ new_venv/bin/python --version
Python 3.13.0b4
$ source new_venv/bin/activate
Not work?
That should work on any system, with any system installl python.
It's not trying to modify the system installed python in anyway...
If not, please
On 8/5/24 15:17, o1bigtenor via Python-list wrote:
That's something like
pyenv install 3.12.4
$ pyenv install 3.12.4
bash: pyenv: command not found
pyenv is not a 'global' package
there is a mountain of /root/.pyenv files though
there is also quite a number of /root
On Mon, Aug 5, 2024 at 3:56 PM Mats Wichmann wrote:
>
> > On Mon, Aug 5, 2024 at 8:51 AM Mats Wichmann > <mailto:m...@wichmann.us>> wrote:
> >
> > On 8/5/24 06:48, o1bigtenor via Python-list wrote:
> > > On Sun, Aug 4, 2024 at 8:49 AM Mats Wi
On Mon, Aug 5, 2024 at 3:55 PM Bill Deegan
wrote:
> Your approach is wrong.
> You don't build python from source using pip.
>
> You don't install new versions of python into a venv either.
>
> Have you read the following?
> https://docs.micropython.org/en/lat
On 8/5/24 14:39, o1bigtenor wrote:
Matt - if you would rather that you were not included in the address
list - -
please advise.
On Mon, Aug 5, 2024 at 8:51 AM Mats Wichmann <mailto:m...@wichmann.us>> wrote:
On 8/5/24 06:48, o1bigtenor via Python-list wrote:
> On Sun, Au
Your approach is wrong.
You don't build python from source using pip.
You don't install new versions of python into a venv either.
Have you read the following?
https://docs.micropython.org/en/latest/esp8266/tutorial/intro.html
That seems to have instructions for what you want to d
Matt - if you would rather that you were not included in the address list -
-
please advise.
On Mon, Aug 5, 2024 at 8:51 AM Mats Wichmann wrote:
> On 8/5/24 06:48, o1bigtenor via Python-list wrote:
> > On Sun, Aug 4, 2024 at 8:49 AM Mats Wichmann via Python-list <
> > pyth
On 8/5/24 06:48, o1bigtenor via Python-list wrote:
On Sun, Aug 4, 2024 at 8:49 AM Mats Wichmann via Python-list <
python-list@python.org> wrote:
On 8/3/24 20:03, o1bigtenor via Python-list wrote:
My question was, is and will be (and the doc absolutely doesn't cover it)
how do
On Sun, Aug 4, 2024 at 8:49 AM Mats Wichmann via Python-list <
python-list@python.org> wrote:
> On 8/3/24 20:03, o1bigtenor via Python-list wrote:
>
> > My question was, is and will be (and the doc absolutely doesn't cover it)
> > how do I install a different versi
On Sun, Aug 4, 2024 at 4:24 AM Peter J. Holzer via Python-list <
python-list@python.org> wrote:
> On 2024-08-03 15:17:11 -0500, o1bigtenor via Python-list wrote:
> > One of the tools I need to be able to use is esptools - - well in the
> > devuan world you need to run that
On 8/3/24 20:03, o1bigtenor via Python-list wrote:
My question was, is and will be (and the doc absolutely doesn't cover it)
how do I install a different version in the venv so that python 3.11.x on
the
system is not discombobulated by the python 3.12.x in the venv.
That python 3.12 woul
On 2024-08-03 15:17:11 -0500, o1bigtenor via Python-list wrote:
> One of the tools I need to be able to use is esptools - - well in the
> devuan world you need to run that on either Devaun 3 or 5 - - - its just
> not available on devuan 4.
Couldn't you just upgrade to Devuan 5, t
On Sat, Aug 3, 2024 at 7:11 PM dn via Python-list
wrote:
> On 4/08/24 09:34, o1bigtenor via Python-list wrote:
> > On Sat, Aug 3, 2024 at 4:06 PM dn via Python-list <
> python-list@python.org>
> > wrote:
> >
> >> On 4/08/24 08:17, o1bigtenor
On Sat, Aug 3, 2024 at 6:20 PM Cameron Simpson via Python-list <
python-list@python.org> wrote:
> On 03Aug2024 16:34, o1bigtenor wrote:
> >So please - - - how do I set up a venv so that I can install and run
> >python
> >3.12
> >(and other needed programs relate
On 4/08/24 09:34, o1bigtenor via Python-list wrote:
On Sat, Aug 3, 2024 at 4:06 PM dn via Python-list
wrote:
On 4/08/24 08:17, o1bigtenor via Python-list wrote:
Greetings
Looking at ESP8266 and wanting to program it using micropython (really
don't want to have to learn C++ (not enough
On 03Aug2024 16:34, o1bigtenor wrote:
So please - - - how do I set up a venv so that I can install and run
python
3.12
(and other needed programs related to 3.12) inside?
Maybe this github comment will help with this:
https://github.com/orgs/micropython/discussions/10255#discussioncomment
On 8/3/2024 2:49 PM, Barry Scott via Python-list wrote:
On 30 Jul 2024, at 18:36, Schimon Jehudah via Python-list
wrote:
Greetings, to one and all!
My name is Schimon, and I am the developer of a news chat bot for the
XMPP network, called Slixfeed.
I have recently added support for OMEMO
On Sat, Aug 3, 2024 at 4:06 PM dn via Python-list
wrote:
> On 4/08/24 08:17, o1bigtenor via Python-list wrote:
> > Greetings
> >
> > Looking at ESP8266 and wanting to program it using micropython (really
> > don't want to have to learn C++ (not enough hours in the
On 4/08/24 08:17, o1bigtenor via Python-list wrote:
Greetings
Looking at ESP8266 and wanting to program it using micropython (really
don't want to have to learn C++ (not enough hours in the day as it is!!)).
One of the tools I need to be able to use is esptools - - well in the
devuan
nd have my cake (and get to eat it too
(grin!).
Suggestions - - - ideas - - - please?
TIA
--
https://mail.python.org/mailman/listinfo/python-list
> On 30 Jul 2024, at 18:36, Schimon Jehudah via Python-list
> wrote:
>
> Greetings, to one and all!
>
> My name is Schimon, and I am the developer of a news chat bot for the
> XMPP network, called Slixfeed.
>
> I have recently added support for OMEMO encryption,
Python 3.13 *release candidate 1* is now available.
https://www.python.org/downloads/release/python-3130rc1/
<https://discuss.python.org/t/python-3-13-0-release-candidate-1-released/59703#p-181511-this-is-the-first-release-candidate-of-python-3130-1>This
is the first release candidate of
You invitation to read on machine is not helping, if you wanna enlighten us
on this specific case otherwise pls spare me such comments which i know
On Wed, 31 Jul 2024, 16:00 Grant Edwards via Python-list, <
python-list@python.org> wrote:
> On 2024-07-31, marc nicole via Python-li
On 2024-07-31, marc nicole via Python-list wrote:
> I suppose the meaning of those numbers comes from this line
> predicts_dict[class_name].append([int(xmin), int(ymin), int(xmax),
> int(ymax), P[index]]) as well as the yolo inference call. But i was
> expecting zeros for all cl
and a sheep wont have any target position or any probability
whatsoever in the image weirdobject.jpg
On Wed, 31 Jul 2024, 00:19 dn via Python-list,
wrote:
> On 31/07/24 06:18, marc nicole via Python-list wrote:
> > Hello all,
> >
> > I want to predict an object by given as in
On 31/07/24 06:18, marc nicole via Python-list wrote:
Hello all,
I want to predict an object by given as input an image and want to have my
model be able to predict the label. I have trained a model using tensorflow
based on annotated database where the target object to predict was added to
the
tand what those function calls
are returning. It's documented somewhere, right?
And you really do need to know the probabilities of the competing images
because otherwise you won't know how confident you can be that the
identification is a strong one.
Le mar. 30 juil. 202
OK, but how's the probability of small_ball greater than others? I can't
find it anyway, what's its value?
Le mar. 30 juil. 2024 à 21:37, Thomas Passin via Python-list <
python-list@python.org> a écrit :
> On 7/30/2024 2:18 PM, marc nicole via Python-list wrote:
> >
On 7/30/2024 2:18 PM, marc nicole via Python-list wrote:
Hello all,
I want to predict an object by given as input an image and want to have my
model be able to predict the label. I have trained a model using tensorflow
based on annotated database where the target object to predict was added to
259], [0.0, 0.0, 275.0, -325.0, 3.0997846126556396],
[711.0, -231.0, -146.0, 392.0, 2.205275535583496]], 'diningtable':
[[138.0, -310.0, 111.0, 448.0, 4.660728931427002], [317.0, -66.0,
313.0, 6.0, 4.535496234893799], [0.0, 0.0, -41.0, 175.0,
1.8571208715438843], [21.0, -92.0, 76.0, 172.0, 1.2035608291625977],
[0.0, 0.0, 448.0, -250.0, 1.00322687625885]], 'car': [[312.0, 232.0,
132.0, 309.0, 3.205225706100464], [514.0, -76.0, 218.0, 448.0,
1.4289973974227905], [0.0, 0.0, 448.0, 142.0, 0.7124998569488525]]}
WHile I expect only the dict to contain the small_ball key
How's that is possible? where's the prediction output?How to fix the code?
--
https://mail.python.org/mailman/listinfo/python-list
package at PyPi, or a fault at my
pyproject.toml.
This is the link to the project:
https://git.xmpp-it.net/sch/Slixfeed#getting-started
Please advise,
Schimon
--
https://mail.python.org/mailman/listinfo/python-list
money, any body
donate me a iMac with ARM CPU? or donate some money at
https://buymeacoffee.com/benjamin_yin <https://buymeacoffee.com/benjamin_yin>
Thanks.
--
https://mail.python.org/mailman/listinfo/python-list
On 7/27/24 17:13, MRAB via Python-list wrote:
On 2024-07-27 21:58, Mats Wichmann via Python-list wrote:
On 7/26/24 16:28, Thomas Passin via Python-list wrote:
On 7/26/2024 7:25 AM, Lizna Shah via Python-list wrote:
OSError: [WinError 225] Operation did not complete successfully
because the
On 2024-07-27 21:58, Mats Wichmann via Python-list wrote:
On 7/26/24 16:28, Thomas Passin via Python-list wrote:
On 7/26/2024 7:25 AM, Lizna Shah via Python-list wrote:
OSError: [WinError 225] Operation did not complete successfully
because the
file contains a virus or potentially unwanted
On 7/26/24 16:28, Thomas Passin via Python-list wrote:
On 7/26/2024 7:25 AM, Lizna Shah via Python-list wrote:
OSError: [WinError 225] Operation did not complete successfully
because the
file contains a virus or potentially unwanted software
That part of the error message tells you the story
On 7/26/2024 7:25 AM, Lizna Shah via Python-list wrote:
OSError: [WinError 225] Operation did not complete successfully because the
file contains a virus or potentially unwanted software
That part of the error message tells you the story. Windows thinks some
file in the install has been
Hello,
I am experiencing a problem with pip not being installed on my laptop and
would appreciate any assistance you can provide.
Here are the details of my issue: -
Operating System: Windows
Python Version: Python 3.10.10
Steps I have already taken to try and resolve the issue:
1. Verified
Python 3.13.0b4, the final beta of Python 3.13, is now available:
https://www.python.org/downloads/release/python-3130b4/
*This is a beta preview of Python 3.13*
Python 3.13 is still in development. This release, 3.13.0b4, is the *final*
beta release preview of 3.13.
Beta release previews are
for you,
like expand.grd. Python has many modules, like itertools that do things
including combinations but perhaps not designed for your case.
Here is a version of your scenario:
import itertools
a = range(3)
b = range(4)
c = range(5)
list(itertools.product(a,b,c))
The result
Thank you very much. List comprehensions make code much more concise indeed. Do
list comprehensions also improve the speed of calculations?
From: avi.e.gr...@gmail.com
Sent: Friday, July 12, 2024 6:57 PM
To: Popov, Dmitry Yu ; 'Popov, Dmitry Yu via Python
some have) or you explain
well enough.
I am guessing you have programming experience in other languages and are not as
“pythonic” as some. The code you show may not be quite how others might do it.
Some may write mch of your code as a single line of python using a list
comprehension such as
Thank you very much, Oscar.
Using the following code looks like a much better solution than my current
Python code indeed.
np.gcd.reduce(np.transpose(a))
or
np.gcd.reduce(a,1)
The next question is how I can generate ndarray of h,k,l indices. This can be
easily done from a Python list by using
arious
functions of the module.
--
https://mail.python.org/mailman/listinfo/python-list
Thank you for your interest. My explanation is too concise indeed, sorry. So
far, I have used Python code with three enclosed 'for' loops for this purpose
which is pretty time consuming. I'm trying to develop a NumPy based code to
make this procedure faster. This routine is kin
--
https://mail.python.org/mailman/listinfo/python-list
On 2024-07-08 19:09:45 +, Popov, Dmitry Yu via Python-list wrote:
> Does NumPy provide a simple mechanism to identify relatively prime
> integers, i.e. integers which don't have a common factor other than +1
> or -1?
Typing "numpy gcd" into my favourite search en
, 2024 3:26 PM
To: avi.e.gr...@gmail.com; 'Popov, Dmitry Yu via Python-list'
Subject: Re: Relatively prime integers in NumPy
Thank you for your interest. My explanation is too concise indeed, sorry. So
far, I have used Python code with three enclosed 'for' loops for th
(posting on-list this time)
On Thu, 11 Jul 2024 at 15:18, Popov, Dmitry Yu via Python-list
wrote:
>
> Dear Sirs.
>
> Does NumPy provide a simple mechanism to identify relatively prime integers,
> i.e. integers which don't have a common factor other than +1 or -1? For
> e
top of numpy.
Is there a reason you cannot solve this mostly outside numpy?
It looks like you could use numpy to select the numbers you want to compare,
then call one of many methods you can easily search for to see how to use
python to make some list or other data structure for divisors of each
I see the literal 'escape' character + 'k', when it should
let me edit previous commands.
I did have to compile my own python because I'm using 2.7 on
this machine.
I figured it out. I needed to apt install libreadline-dev.
--
https://mail.python.org/mailman/listinfo/python-list
For this to work, the Python implementation should use the same
readline library as your shell, I guess.
It works in python3, so I guess my problem is that I'm
compiling python (I think kubuntu dropped python2), but
I don't see any relevant options in the configure help.
sinewave:toby ~(1)> python
Python 2.7.18 (default, Jul 8 2024, 12:49:12)
[GCC 13.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import MySQLdb
Traceback (most recent call last):
File "", line 1, in
Kubuntu 24.04.
sinewave:toby ~(1)> cat .inputrc
set editing-mode vi
set keymap vi
sinewave:toby ~(1)> cat .editrc
bind -v
bind \\t rl_complete
sinewave:toby ~(1)> python
Python 2.7.18 (default, Jul 8 2024, 12:49:12)
[GCC 13.2.0] on linux2
Type "help", "copyright"
ctors along axis
0: [1,2,3]. Those triples of numbers along axis 1 with the factor of1 or -1
would be relatively prime integers.
Regards,
Dmitry Popov
Argonne, IL
USA
--
https://mail.python.org/mailman/listinfo/python-list
s doing something (here: printing an incrementing value
> named "info") and also serving requests from other processes
> for this "info" value:
>
[snip]
Thanks, that should get me started! :-)
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/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
> 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.or
test-default-languages=True to be set as a default.
2. I tried to subscribe to Python-ideas python-id...@python.org, but I
can't login to
https://mail.python.org/mailman3/lists/python-ideas.python.org/. Although I
did login to https://mail.python.org/mailman/options/python-list . Do I
ha
On 06/07/2024 12:57, Oscar Benjamin via Python-list wrote:
On Sat, 6 Jul 2024 at 11:55, Rob Cliffe via Python-list
wrote:
Consider this scenario (which I ran into in real life):
I want to open a text file and do a lot of processing on the lines
of that file.
If the file does not
Daniel via Python-list writes:
> One thing missing is a good textmode irc client that will connect to
> quassel core.
>
> I've seen efforts to make a plugin for weechat but, to date, I don't see much
> progress on that end.
>
> In your wisdom, would python be a
ns of characters that would be
kept up to date by one process and asked for by all the others.
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
> This is even simpler than using a file.
>
Yes, but it's conceptually (and programming wise) much simpler to have
separate scripts. Some of them are simple 'on demand' scripts that I
run from the command line when I want to know something. Others are
scripts that drive displays on control panels.
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
d executing them one at a time.
On Sun, Jul 7, 2024 at 11:12 PM Chris Green via Python-list
wrote:
>
> I have a Raspberry Pi in my boat that uses I2C to read a number of
> voltages and currents (using ADS1115 A2D) so I can monitor the battery
> condition etc.
>
> At present var
> On 7 Jul 2024, at 23:21, Barry via Python-list wrote:
>
>
>
>> On 7 Jul 2024, at 22:09, Tomas Ukkonen via Python-list
>> wrote:
>>
>>Py_Initialize();
>
> You also need to tell python to init threading.
I'm in front of my dev machine
> On 7 Jul 2024, at 23:47, MRAB via Python-list wrote:
>
> For clarity I'd recommend os.replace instead. This is because on Windows
> os.rename it would complain if the target file already exists, but os.replace
> has the same behaviour on both Linux and Windows.
Agree
ry/except.
--
https://mail.python.org/mailman/listinfo/python-list
the run:
% python3 p.py
line: here are
line: some lines of text
--
https://mail.python.org/mailman/listinfo/python-list
On 2024-07-07 23:27, Barry via Python-list wrote:
On 7 Jul 2024, at 22:13, Chris Green via Python-list
wrote:
a simple file lock can then
be used to prevent simultaneous access (well, simultaneous access when
the writing process is writing).
There is a simple pattern to make this robust
> On 7 Jul 2024, at 22:13, Chris Green via Python-list
> wrote:
>
> a simple file lock can then
> be used to prevent simultaneous access (well, simultaneous access when
> the writing process is writing).
There is a simple pattern to make this robust.
Write new values to
t work (trying to access the file after "with f"
raises the same
ValueError: I/O operation on closed file.
I'm using Python 3.11.5.
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
python.org/mailman/listinfo/python-list
-
https://mail.python.org/mailman/listinfo/python-list
hon.org/mailman/listinfo/python-list
pen()` call returns a file object _which can be used as
a context manager_. It is separate from the `with` itself.
--
https://mail.python.org/mailman/listinfo/python-list
On 6/07/24 22:49, Rob Cliffe via Python-list wrote:
Consider this scenario (which I ran into in real life):
I want to open a text file and do a lot of processing on the lines
of that file.
If the file does not exist I want to take appropriate action, e.g.
print an error message and
print(f"File {FileName} not found:")
sys.exit()
Now the "process" function has been factored out and can be well
documented as to what it is doing on each line, and this code can be
documented as running process on each line of the file.
On 7/6/24 6:49 AM, Rob Cliffe vi
On 7/6/2024 6:49 AM, Rob Cliffe via Python-list wrote:
Consider this scenario (which I ran into in real life):
I want to open a text file and do a lot of processing on the lines
of that file.
If the file does not exist I want to take appropriate action, e.g.
print an error message
701 - 800 of 3262 matches
Mail list logo