Loris Bennett wrote at 2024-11-12 10:00 +0100:
> ...
>However, it strikes me as not immediately obvious that the logging file
>must exist at this point. I can imagine a situation in which I want to
>configure a default log file and create it if it missing.
This is what happens usually:
if you ope
Cameron Simpson wrote at 2024-11-12 08:17 +1100:
>On 11Nov2024 18:24, dieter.mau...@online.de wrote:
>>Loris Bennett wrote at 2024-11-11 15:05 +0100:
>>>I have the following in my program:
>>>try:
>>>logging.config.fileConfig(args.config_file)
>>>config = configparser.ConfigPar
Loris Bennett wrote at 2024-11-11 15:05 +0100:
>I have the following in my program:
>try:
>logging.config.fileConfig(args.config_file)
>config = configparser.ConfigParser()
>config.read(args.config_file)
>if args.verbose:
>print(f"Configuration file:
Loris Bennett wrote at 2024-11-1 10:10 +0100:
> ...
> mail.set_content(body, cte="quoted-printable")
In the line above, you request the content to use
the "cte" (= "Content-Transfer-Encoding") "quoted-printable"
and consequently, the content is encoded with `quoted-printable`.
Maybe, you do not n
> ...
>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 `youtoube_dl` where Pytho
Ulrich Goebel wrote at 2024-6-28 18:08 +0200:
>Hi,
>
>a class can have methods, and it can have attributes, which can hold a
>function. Both is well known, of course.
>
>My question: Is there any difference?
I think you should make the distinction "class versus instance attribute"
rather than "me
> logging.error("File not")
Are you aware that in the case of a `FileNotFoundError`
no context manager is created (the context manager is the `f`
in your code).
Why not use:
try:
with open()...
...
except FileNotFoundError:
...
I do not think that your use case requ
Edward Teach wrote at 2024-6-3 10:47 +0100:
> ...
>The Gutenburg Project publishes "plain text". That's another problem,
>because "plain text" means UTF-8and that means unicode...and that
>means running some sort of unicode-to-ascii conversion in order to get
>something like "words". A couple
HenHanna wrote at 2024-5-30 13:03 -0700:
>
>Given a text file of a novel (JoyceUlysses.txt) ...
>
>could someone give me a pretty fast (and simple) Python program that'd
>give me a list of all words occurring exactly once?
Your task can be split into several subtasks:
* parse the text into words
Johanne Fairchild wrote at 2024-5-3 10:56 -0300:
>How to discover what values produced an exception? Or perhaps---why
>doesn't the Python traceback show the values involved in the TypeError?
>For instance:
>
>--8<>8---
(0,0) < 4
>Traceba
dieter.mau...@online.de wrote at 2024-3-22 18:28 +0100:
>Thomas Nyberg wrote at 2024-3-22 11:08 +0100:
>> ... `future` use across thread boundaries ...
>> Here's an example using just the standard library that
>> exhibits the same issue:
> ...
>For use across thread boundaries, you likely will use
Thomas Nyberg wrote at 2024-3-22 11:08 +0100:
> ... `future` use across thread boundaries ...
> Here's an example using just the standard library that
> exhibits the same issue:
I think all `asyncio` objects (futures, tasks, ...)
are meant to be used in a single thread.
If you use them across diff
Loris Bennett wrote at 2024-3-21 10:56 +0100:
> ...
>So as I understand it, I need to convert the InstanceState-objects to,
>say, dicts, in order to print them. However I also want to remove one
>of the keys from the output and assumed I could just pop it off each
>event dict, thus:
>
>event_d
Sanskar Mukeshbhai Joshi wrote at 2024-3-10 18:08 +:
>I had made my project in BCA in Python. When I had complete my project and run
>the program, at that time I got the error in runnig my project. The error was
>ModuleNotFoundError: No module named 'flask'.
`flask` is not part of the Python
Rich Shepard wrote at 2024-1-29 08:15 -0800:
> ...
>If this explanation is not sufficiently clear I'll re-write it. :-)
Have you read "https://docs.python.org/3/library/io.html#module-io";?
--
https://mail.python.org/mailman/listinfo/python-list
>On 27/01/24 10:46 am, Stefan Ram wrote:
>>But your explanation seems to have no mention of the "something" /
>>"the awaitable object" part following the preposition "on". Shouldn't
>>this awaitable object play a rôle in the explanation of what happens?
You can explain a function call
Frank Millman wrote at 2024-1-15 15:51 +0200:
>I have read that one should not have to worry about garbage collection
>in modern versions of Python - it 'just works'.
There are still some isolated cases when not all objects
in an unreachable cycle are destroyed
(see e.g. step 2 of
"https://devgui
Guenther Sohler wrote at 2024-1-9 08:14 +0100:
>when i run this code
>
>a = cube([10,1,1])
>b = a
>
>i'd like to extend the behaviour of the assignment operator
>a shall not only contain the cube, but the cube shall also know which
>variable name it
>was assigned to, lately. I'd like to use that
Piergiorgio Sartor wrote at 2023-11-25 22:15 +0100:
> ...
>Apparently, the "with" context manager is not usable
>in classes, at least not with __init__() & co.
You can use `with` in classes -- with any context manager.
However, you would usually not use `with` with a file you have opened
in `__ini
Dom Grigonis wrote at 2023-11-16 21:11 +0200:
> ...
>> On 16 Nov 2023, at 21:00, Dieter Maurer wrote:
>> ...
>> Methods are not bound during instance creation, they are bound during
>> access.
>
>Good to know. What is the criteria for binding then? Does i
Dom Grigonis wrote at 2023-11-16 20:12 +0200:
>What I am interested in is a callback.
>Preferably just after methods get bound. So in `object.__new__`.
>I have done it via metaclass, but it is not ideal as there would be too much
>overhead.
>
>I think what I am looking for is custom method bindin
Dom Grigonis wrote at 2023-11-15 18:44 +0200:
>So there is a method __set_name__ which is called on class creation.
>
>The functionality that I am interested in is not retrieving name, but the fact
>that it also receives `owner` argument.
>
>Thus, allowing simulation of bound class method.
>
>I wa
c.bu...@posteo.jp wrote at 2023-11-6 12:47 +:
>I would like to know how to detect (e.g. via a linter) typos in function
>names imported from another module.
One option is a test suite (--> Python's "unittest" package)
with a sufficiently high coverage (near 100 %).
--
https://mail.python.org/
Karsten Hilbert wrote at 2023-11-5 23:19 +0100:
> ...
>do you happen to know where to read up on how to fit a pip
>constraint file into a Debian package creation workflow ?
I have only rudimentary `apt` knowledge.
I know it is quite flexible, e.g. it used to handle `flash`
in a special way. I exp
Karsten Hilbert wrote at 2023-11-3 14:47 +0100:
> ...
>> Are they not available in your system's package manager?
>
>... this clearly often answers to "no" for applications of
>any complexity.
>
>Is there a suggested proper path to deal with that (Debian is
>of interest to me here) ?
Complex appli
Chris Green wrote at 2023-11-2 10:58 +:
> ...
>So, going on from this, how do I do the equivalent of "apt update; apt
>upgrade" for my globally installed pip packages?
`pip list -o` will tell you for which packages there are upgrades
available.
`pip install -U ...` will upgrade packages.
Be c
Chris Green wrote at 2023-10-28 17:08 +0100:
>I am using the python3 smbus module, but it's hard work because of the
>lack of documentation. Web searches confirm that the documentation is
>somewhat thin!
>
>If you do the obvious this is what you get:-
>
>>>> import smbus
>>>> dir (smbus)
>
Loris Bennett wrote at 2023-10-27 09:29 +0200:
> ...
>For the application with the system Python this mechanism works, but for
>the non-system Python I get the error:
>
> NameError: name '__version__' is not defined
If you get exceptions (they usually end in `Error` (such as `NameError`)),
look a
o1bigtenor wrote at 2023-10-25 08:29 -0500:
> ...
>It would appear that something has changed.
>
>Went to the Eclipse download page, downloaded and verified (using sha-512).
>Expanded software to # opt .
>There is absolutely NO mention of anything python - - - java, c and
>its permutations,
>'scien
o1bigtenor wrote at 2023-10-25 07:50 -0500:
>> There are several others,
>> e.g. "ECLIPSE" can be used for Python development.
>
>Is 'Eclipse' a Windows oriented IDE?
No.
==> "https://en.wikipedia.org/wiki/Eclipse_(software)"
--
https://mail.python.org/mailman/listinfo/python-list
o1bigtenor wrote at 2023-10-25 06:44 -0500:
>On Wed, Oct 25, 2023 at 6:24?AM Dieter Maurer wrote:
> ...
>> There are different kinds of errors.
>>
>> Some can be avoided by using an integrated development environment
>> (e.g. misspellings, type mismatches, ...).
&g
p as a
>reverse-proxy using Nginx. I tested this a few years ago using Apache,
>and it 'just worked', so I am fairly sure that it will work with Nginx
>as well. Nginx can then provide the additional functionality that Dieter
>has mentioned.
Good ideas.
--
https://mail.python.org/mailman/listinfo/python-list
o1bigtenor wrote at 2023-10-24 07:22 -0500:
> ...
>Is there a way to verify that a program is going to do what it is
>supposed to do even
>before all the hardware has been assembled and installed and tested?
Others have already noted that "verify" is a very strong aim.
There are different kinds o
Janis Papanagnou wrote at 2023-10-21 04:03 +0200:
> ...
>I'd like to ask; where do you see the specific risks with Python
>(as language per se) and it's (web-socket-)libraries here?
The web server in Python's runtime library is fairly simple,
focusing only on the HTTP requirements.
You might want
Jen Kris wrote at 2023-10-2 00:04 +0200:
>Iwant to write a list of 64-bit integers to a binary file. Everyexample I
>have seen in my research convertsit to .txt, but I want it in binary. I wrote
>this code,based on some earlier work I have done:
>
>buf= bytes((len(qs_array)) * 8)
>
>for offset
Jan Erik Moström wrote at 2023-9-3 18:10 +0200:
>I'm looking for some advice for how to write this in a clean way
> ...
>The "problem" is that I've currently written some code that works but it uses
>global variables ... and I don't like global variables. I assume there is a
>better way to write
c.bu...@posteo.jp wrote at 2023-8-17 07:10 +:
>I want to display one string in its original source (untranslated)
>version and in its translated version site by site without duplicating
>the string in the python source code?
You could try to translate into an unknown language: this
should give
c.bu...@posteo.jp wrote at 2023-8-17 07:10 +:
>I want to display one string in its original source (untranslated)
>version and in its translated version site by site without duplicating
>the string in the python source code?
Is it an option for you to replace the `gettext` binding
by `zope.i18
Jason Friedman wrote at 2023-8-3 21:34 -0600:
> ...
>my_frame = inspect.currentframe()
> ...
>My question is: let's say I wanted to add a type hint for my_frame.
`my_frame` will be an instance of `Types.FrameType`.
--
https://mail.python.org/mailman/listinfo/python-list
Dom Grigonis wrote at 2023-7-26 05:22 +0300:
> ...
>Is there a way to achieve it without actually implementing operators?
>I have looked at Proxy objects, but they do not seem suited to achieve this.
Proxying is a good approach:
you might have a look at `dm.reuse.proxy.OverridingProxy` (--> `dm.re
Chris Nyland wrote at 2023-7-22 19:12 -0400:
>So I am stuck on a problem. I have a class which I want to use to create
>another class without having to go through the boiler plate of subclassing.
Do you know about `__init_subclass__`?
It is called whenever a class is subclassed and can be used to
Bob Kline wrote at 2023-7-14 13:35 -0400:
>Can someone point me to the official catalog of security vulnerabilities in
>Python (by which I mean cpython and the standard libraries)? I found
>https://www.cvedetails.com/vulnerability-list/vendor_id-10210/product_id-18230/Python-Python.html
>but that i
Chris Angelico wrote at 2023-5-26 18:29 +1000:
> ...
>However, if you want to change the wording, I'd be more inclined to
>synchronize it with float():
>
float("a")
>Traceback (most recent call last):
> File "", line 1, in
>ValueError: could not convert string to float: 'a'
+1
--
https://m
Horst Koiner wrote at 2023-5-9 11:13 -0700:
> ...
>For production i run the program with stdout=subprocess.PIPE and i can fetch
>than the output later. For just testing if the program works, i run with
>stdout=subprocess.STDOUT and I see all program output on the console, but my
>program afterwa
Chris Green wrote at 2023-5-6 15:58 +0100:
>Chris Green wrote:
>> I'm having a real hard time trying to do anything to a string (?)
>> returned by mailbox.MaildirMessage.get().
>>
>What a twit I am :-)
>
>Strings are immutable, I have to do:-
>
>newstring = oldstring.replace("_", " ")
The sol
Roy Hann wrote at 2023-4-30 15:40 -:
>Is there anyone using loguru (loguru 0.5.3 in my case) successfully in a
>library?
> ...
> import mylib
> logger.enable('mylib')
>
>expecting that it would report any log messages above level DEBUG, just
>as it does when I don't disable logging.
Have you
Guenther Sohler wrote at 2023-4-13 09:40 +0200:
> ...
>I have been working on adding embedded python into OpenSCAD (
>www.openscad.org)
>for some time already. For that i coded/added an additional Python Type
>Object
>which means to hold openscad geometric data.
>
>It works quite well but unfortuna
Pranav Bhardwaj wrote at 2023-4-3 22:13 +0530:
>Why can't I able to use python libraries such as numpy, nudenet, playsound,
>pandas, etc in my python 3.11.2. It always through the error "import
>'numpy' or any other libraries could not be resolved".
The "libraries" you speak of are extensions (i.e
aapost wrote at 2023-3-5 09:35 -0500:
> ...
>If a file is still open, even if all the operations on the file have
>ceased for a time, the tail of the written operation data does not get
>flushed to the file until close is issued and the file closes cleanly.
This is normal: the buffer is flushed if
Chris Angelico wrote at 2023-3-1 12:58 +1100:
> ...
> The
>atomicity would be more useful in that context as it would give
>lock-free ID generation, which doesn't work in Python.
I have seen `itertools.count` for that.
This works because its `__next__` is implemented in "C" and
therefore will not
Thomas Passin wrote at 2023-2-22 21:04 -0500:
>On 2/22/2023 7:58 PM, avi.e.gr...@gmail.com wrote:
> ...
>> So can anyone point to places in Python where a semicolon is part of a best
>> or even good way to do anything?
>
>Mostly I use it to run small commands on the command line with python
>-c. e
Azizbek Khamdamov wrote at 2023-2-19 19:03 +0500:
> ...
>Example 2 (weird behaviour)
>
>file = open("D:\Programming\Python\working_with_files\cities.txt",
>'r+') ## contains list cities
># the following code DOES NOT add new record TO THE BEGINNING of the
>file IF FOLLOWED BY readline() and readlin
Frank Millman wrote at 2023-1-26 12:12 +0200:
>I have written a simple HTTP server using asyncio. It works, but I don't
>always understand how it works, so I was pleased that Python 3.11
>introduced some new high-level concepts that hide the gory details. I
>want to refactor my code to use these co
John McCardle wrote at 2023-1-25 22:31 -0500:
> ...
>1) To get the compiled Python to run independently, I have to hack
>LD_LIBRARY_PATH to get it to execute. `LD_LIBRARY_PATH=./Python-3.11.1
>./Python-3.11.1/python` .
The need to set `LD_LIBRARY_PATH` usually can be avoided via
a link time option
aapost wrote at 2023-1-10 22:15 -0500:
>On 1/4/23 12:13, aapost wrote:
>> On 1/4/23 09:42, Dieter Maurer wrote:
>> ...
>>> You might have a look at `PyXB`, too.
>>> It tries hard to enforce schema restrictions in Python code.
>> ...
>Unfortunately picking
Cameron Simpson wrote at 2023-1-11 08:37 +1100:
> ...
>There's a Discourse forum over at discuss.python.org. I use it in
>"mailing list mode" and do almost all my interactions via email, exactly
>as I do for python-list. Posts come to me and land in the same local
>mail folder I use for python-list
Chris Green wrote at 2023-1-10 08:45 +:
> ...
>Yes, this is important I think. Plus, if possible, if it's decided to
>move to a forum format make that accessible by E-Mail.
I much prefer a mailing list over an http based service.
With mailing lists, all interesting messages arrive in my email
Keith Thompson wrote at 2023-1-6 17:02 -0800:
>September Skeen writes:
>> I was wondering if I could be in your group
>
>This is an unmoderated Usenet newsgroup.
In fact, there are several access channels, Usenet newsgroup is
one of them.
Another channel is the python-list mailing list.
You can
aapost wrote at 2023-1-3 22:57 -0500:
> ...
>Consider the following:
>
>from lxml import objectify, etree
>schema = etree.XMLSchema(file="path_to_my_xsd_schema_file")
>parser = objectify.makeparser(schema=schema, encoding="UTF-8")
>xml_obj = objectify.parse("path_to_my_xml_file", parser=parser)
>xm
Antoon Pardon wrote at 2022-12-27 14:25 +0100:
> ...
>> But a simple "sys.modules['threading'] = QYZlib.threaders" will work.
>> Of course, how *well* this works depends also on how well that module
>> manages to masquerade as the threading module, but I'm sure you've
>> figured that part out :)
>
Marce Coll wrote at 2022-12-20 22:09 +0100:
>Hi python people, hope this is the correct place to ask this!
>
>For a transactional async decorator I'm building I am using contextvars in
>order to know when a transaction is open in my current context.
>
>My understanding is that if given the followi
Gisle Vanem wrote at 2022-11-30 10:51 +0100:
>I have an issue with 'pip v. 22.3.1'. On any
>'pip install' command I get warning like this:
> c:\> pip3 install asciinema
> WARNING: Ignoring invalid distribution -arkupsafe
> (f:\gv\python310\lib\site-packages)
> WARNING: Ignoring invalid distr
Jach Feng wrote at 2022-11-15 22:52 -0800:
>My working directory d:\Works\Python\ has a package 'fitz' looks like this:
>
>fitz\
>__init__.py
>fitz.py
>utils.py
>_fitz.pyd
>
>There is a statement in fitz.py:
>return importlib.import_module('fitz._fitz')
>
>It
Ian Pilcher wrote at 2022-11-11 15:29 -0600:
> ...
>In searching, I've found a few articles that discuss the fact that
>classmethod objects aren't callable, but the situation actually seems to
>be more complicated.
>
> >>> type(DuidLLT._parse_l2addr)
>
> >>> callable(DuidLLT._parse_l2addr)
>True
>
Ian Pilcher wrote at 2022-11-11 10:21 -0600:
>Is it possible to access the name of a superclass static method, when
>defining a subclass attribute, without specifically naming the super-
>class?
>
>Contrived example:
>
> class SuperClass(object):
> @staticmethod
> def foo():
>
Dan Stromberg wrote at 2022-8-16 14:03 -0700:
> ...
>I'm attempting to package up a python package that uses Cython.
> ...
> Installing build dependencies ... error
> error: subprocess-exited-with-error
>
> ×? pip subprocess to install build dependencies did not run successfully.
> ?? exit code
Dennis Lee Bieber wrote at 2022-8-10 14:19 -0400:
>On Wed, 10 Aug 2022 19:33:04 +0200, "Dieter Maurer"
> ...
>>You could also use the `sched` module from Python's library.
>
>Time to really read the library reference manual again...
>
>
Schachner, Joseph (US) wrote at 2022-8-9 17:04 +:
>Why would this application *require* parallel programming? This could be
>done in one, single thread program. Call time to get time and save it as
>start_time. Keep a count of the number of 6 hour intervals, initialize it to
>0.
You c
ojomooluwatolami...@gmail.com wrote at 2022-8-5 08:34 +0100:
>Hello, I’m new to learning python and I stumbled upon a question nested loops.
For future, more complex, questions of this kind,
you might have a look at the module `pdb` in Python's runtime library.
It implements a debugger which allow
Albert-Jan Roskam wrote at 2022-7-31 11:39 +0200:
> I have a function init_logging.log_uncaught_errors() that I use for
> sys.excepthook. Now I also want to call another function (ffi.dlclose())
> upon abnormal termination. Is it possible to register multiple
> excepthooks, like with atexit
Please stay on the list (such that others can help, too)
Ben Hirsig wrote at 2022-7-29 06:53 +1000:
>Thanks for the replies, I'm just trying to understand why this would be
>useful?
>
>E.g. why does max need a min/max/resolution, and why would these attributes
>themselves need a min/max/resolution
Ben Hirsig wrote at 2022-7-28 19:54 +1000:
>Hi, I noticed this when using the requests library in the response.elapsed
>object (type timedelta). Tested using the standard datetime library alone
>with the example displayed on
>https://docs.python.org/3/library/datetime.html#examples-of-usage-timedel
נתי שטרן wrote at 2022-6-24 08:28 +0300:
>I copied code from argparse library and modified it
>
>בתאריך יום חמישי, 23 ביוני 2022, מאת Dieter Maurer :
>
>> נתי שטרן wrote at 2022-6-23 15:31 +0300:
>> >how to solve this (argparse)
>> >
>> >
>&g
נתי שטרן wrote at 2022-6-23 15:31 +0300:
>how to solve this (argparse)
>
>
>traceback:
>Traceback (most recent call last):
> File "u:\oracle\RTR.py", line 10, in
>class sre_constants():
> File "u:\oracle\RTR.py", line 77, in sre_constants
>MAXREPEAT = _NamedIntConstant(32,name=str(32))
>
Chethan Kumar S wrote at 2022-6-21 02:04 -0700:
> ...
>I have a main process which makes use of different other modules. And these
>modules also use other modules. I need to log all the logs into single log
>file. Due to use of TimedRotatingFileHandler, my log behaves differently after
>midnight
jsch...@sbcglobal.net wrote at 2022-6-20 13:49 -0500:
>I coded an application with a 64-bit executable using cython with the embed
>option and gcc and I received a traceback showing the path to my python
>installation. Is that normal or does that mean the application is going
>outside of my execut
Pablo Martinez Ulloa wrote at 2022-5-18 15:08 +0100:
>I have been using your C++ Python API, in order to establish a bridge from
>C++ to Python.
Do you know `cython`?
It can help very much in the implementation of bridges between
Python and C/C++.
--
https://mail.python.org/mailman/listinfo/pytho
Cecil Westerhof wrote at 2022-4-14 17:02 +0200:
>In C when you declare a variable static in a function, the variable
>retains its value between function calls.
>The first time the function is called it has the default value (0 for
>an int).
>But when the function changes the value in a call (for ex
Antoon Pardon wrote at 2022-4-7 17:16 +0200:
> ...
>Sorry I wasn't clear. The data contains information about persons. But not
>all records need to be complete. So a person can occur multiple times in
>the list, while the records are all different because they are missing
>different bits.
>
>So all
Marco Sulla wrote at 2022-4-3 21:17 +0200:
>On Sun, 3 Apr 2022 at 18:57, Dieter Maurer wrote:
>> You know you can easily implement this yourself -- in your own
>> `dict` subclass.
>
>Well, of course, but the question is if such a method is worth to be
>builtin, in a w
Marco Sulla wrote at 2022-4-2 22:44 +0200:
>A proposal. Very often dict are used as a deeply nested carrier of
>data, usually decoded from JSON. Sometimes I needed to get some of
>this data, something like this:
>
>data["users"][0]["address"]["street"]
>
>What about something like this instead?
>
>
Grant Edwards wrote at 2022-3-31 07:41 -0700:
>Is anybody aware of any Python code for the Exchange OWA protocol/API?
According to "https://en.wikipedia.org/wiki/Outlook.com#Mail_client_access";
Outlook.com (the modern name for OWA) supports "pop3" and "imap",
both supported by Python library modu
Nicolas Haller wrote at 2022-3-12 12:05 -0500:
>On 2022-03-10 12:31, Dieter Maurer wrote:
>> Nicolas Haller wrote at 2022-3-9 10:53 -0500:
>>> ...
>>> The documentation about "user-defined generic types"[1] says that I can
>>> fix some types on a ch
Loris Bennett wrote at 2022-3-11 07:40 +0100:
> ... I want to test the parsing ...
>Sorry if I was unclear but my question is:
>
>Given that the return value from Popen is a Popen object and given that
>the return value from reading a file is a single string or maybe a list
>of strings, what should
Nicolas Haller wrote at 2022-3-9 10:53 -0500:
> ...
>The documentation about "user-defined generic types"[1] says that I can
>fix some types on a child class (class MyDict(Mapping[str, T]):) but
>doesn't say much about the signature of the methods I need to
>implement/override on that child class.
Loris Bennett wrote at 2022-3-10 13:16 +0100:
>I have a command which produces output like the
>following:
>
> Job ID: 9431211
> Cluster: curta
> User/Group: build/staff
> State: COMPLETED (exit code 0)
> Nodes: 1
> Cores per node: 8
> CPU Utilized: 01:30:53
> CPU Efficiency: 83.63% of 01:4
Martin Di Paola wrote at 2022-3-6 20:42 +:
>>Try to use `fork` as "start method" (instead of "spawn").
>
>Yes but no. Indeed with `fork` there is no need to pickle anything. In
>particular the child process will be a copy of the parent so it will
>have all the modules loaded, including the dyna
Martin Di Paola wrote at 2022-3-6 12:42 +:
>Hi everyone. I implemented time ago a small plugin engine to load code
>dynamically.
>
>So far it worked well but a few days ago an user told me that he wasn't
>able to run in parallel a piece of code in MacOS.
>
>He was using multiprocessing.Process
Avi Gross wrote at 2022-3-4 16:43 +:
>Your use is creative albeit it is not "needed" since all it does is make sure
>your variable is initialized to something, specifically None.
>
>So would this not do the same thing?
>
> eye = None
>
> for eye in range(0):
> print(eye)
>
> eye
It wo
Rob Cliffe wrote at 2022-3-4 00:13 +:
>I find it so hard to remember what `for ... else` means that on the very
>few occasions I have used it, I ALWAYS put a comment alongside/below the
>`else` to remind myself (and anyone else unfortunate enough to read my
>code) what triggers it, e.g.
>
>
computermaster360 wrote at 2022-3-3 14:24 +0100:
>Do you find the for-else construct useful?
Yes.
>Have you used it in practice?
Yes
--
https://mail.python.org/mailman/listinfo/python-list
Robin Becker wrote at 2022-3-3 09:21 +:
>On 02/03/2022 18:39, Dieter Maurer wrote:
>> Robin Becker wrote at 2022-3-2 15:32 +:
>>> I'm using lxml.etree.XMLParser and would like to distinguish
>>>
>>>
>>>
>>> from
>>>
>&
Robin Becker wrote at 2022-3-2 15:32 +:
>I'm using lxml.etree.XMLParser and would like to distinguish
>
>
>
>from
>
>
>
>I seem to have e.getchildren()==[] and e.text==None for both cases. Is there a
>way to get the first to have e.text==''
I do not think so (at least not without a DTD):
`' i
Abdur-Rahmaan Janhangeer wrote at 2022-2-20 19:32 +0400:
>Out of curiosity, why doesn't Python accept
>def ():
>return '---'
>
>()
>
>Where the function name is ''?
Python knows about (somewhat restricted) anonymous functions:
it calls them `lambda` expressions (the body of those functions
can
Christian Gollwitzer wrote at 2022-2-8 22:43 +0100:
>Am 08.02.22 um 18:57 schrieb Dieter Maurer:
>> Christian Gollwitzer wrote at 2022-2-7 20:33 +0100:
>>> we've developed a Python pacakge which consists of both a compiled
>>> extension module and some helper
Christian Gollwitzer wrote at 2022-2-7 20:33 +0100:
>we've developed a Python pacakge which consists of both a compiled
>extension module and some helper functions in Python. Is there a
>tutorial on how to package such an extension?
Look at "https://package.python.org";,
especially
"https://packa
Grant Edwards wrote at 2022-2-3 14:36 -0800:
>On 2022-02-03, Barry wrote:
> ...
>I've looked through the ssl.Context documentation multiple times, and
>haven't been able to spot any option or flag that disables client
>certificate validation or allows the user to override the actual
>client certif
Sina Mobasheri wrote at 2022-2-4 15:55 +:
>it's not good title defiantly and I don't mean to compare apples and oranges
>
>when I start using python virtual environment it was because isolation
>proposes and everyone say about its benefits in isolation and working with
>different versions of
Michael Welle wrote at 2022-2-1 19:28 +0100:
> ...
>That doesn't happen when the 'real' issue occurs. Attaching strace to
>the Python process I can see that resolv.conf is stat'ed and open'ed. I
>guess now I'm more confused than before ;). There must be an additional
>condition that I'm missing.
T
Michael Welle wrote at 2022-1-30 09:18 +0100:
> ...
The machine this is running on regularly switches
>its network configuration without restarting the Python application. Now
>it turns out that the application is still using an old, outdated dns
>server after such a network configuration switch.
1 - 100 of 985 matches
Mail list logo