> On 7 Mar 2022, at 02:33, Martin Di Paola wrote:
>
> Yes but I think that unpickle (pickle.loads()) does that plus
> importing any module needed
Are you sure that unpickle will import code? I thought it did not do that.
Barry
--
https://mail.python.org/mailman/listinfo/python-list
I understand that yes, pickle.loads() imports any necessary module but
only if they can be find in sys.path (like in any "import" statement).
Dynamic code loaded from a plugin (which we presume it is *not* in
sys.path) will not be loaded.
Quick check. Run in one console the following:
import mu
On 2022-03-07, Peter J. Holzer wrote:
> On 2022-03-06 18:34:39 -0800, Grant Edwards wrote:
>> On 2022-03-06, Avi Gross via Python-list wrote:
>> > Python is named after a snake right?
>>
>> No. It's named after a comedy troupe.
>
> He actually wrote that two sentences later.
Yes, I missed that.
Hello everyone.
i had upload a Django app to an ubuntu 18.04 server and it gives me the
same pdf everytime the view is called. To generate the pdf it receipts
differents string buy it gives me the same pdf. Could you give some idea
what is happening?
thanks everyone
@never_cached
def generar_pdf(r
I use cibuildwheel to build extensions with a github action. For the macos 11.0 arm64 build I get a strange message from
the load command. So I am looking for assistance to try and figure out what is going wrong.
The cibuild action uses the latest pip 21.2.4 and latest setuptools etc.
I use bre
Thank you MRAB for your reply.
Regarding your first question, pSentence is a list. In the nltk library,
nltk.word_tokenize takes a string, so we convert sentence to string before we
call nltk.word_tokenize:
>>> sentence = " ".join(sentence)
>>> pt = nltk.word_tokenize(sentence)
>>> print(sente
On Tue, 8 Mar 2022 at 04:06, Jen Kris via Python-list
wrote:
> But with the C API it looks like this:
>
> PyObject *pSentence = PySequence_GetItem(pSents, sent_count);
> PyObject* str_sentence = PyObject_Str(pSentence); // Convert to string
>
> PyObject* repr_str = PyObject_Repr(str_sentence);
Y
The PyObject str_sentence is a string representation of a list. I need to
convert the list to a string like "".join because that's what the library call
takes.
Mar 7, 2022, 09:09 by ros...@gmail.com:
> On Tue, 8 Mar 2022 at 04:06, Jen Kris via Python-list
> wrote:
>
>> But with the C API
On Tue, 8 Mar 2022 at 04:13, Jen Kris wrote:
>
>
> The PyObject str_sentence is a string representation of a list. I need to
> convert the list to a string like "".join because that's what the library
> call takes.
>
What you're doing is the equivalent of str(sentence), not
"".join(sentence).
Can someone please change the topic of this thread? No longer about for-else.
Teledyne Confidential; Commercially Sensitive Business Data
-Original Message-
From: Dennis Lee Bieber
Sent: Sunday, March 6, 2022 1:29 PM
To: python-list@python.org
Subject: Re: Behavior of the for-else con
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
On Mon, 7 Mar 2022 18:07:42 +, "Schachner, Joseph"
declaimed the following:
>Can someone please change the topic of this thread? No longer about for-else.
>
Pretty much anyone can change the subject of the message when replying.
But if one is using a threaded client, that t
On 2022-03-07 17:05, Jen Kris wrote:
Thank you MRAB for your reply.
Regarding your first question, pSentence is a list. In the nltk
library, nltk.word_tokenize takes a string, so we convert sentence to
string before we call nltk.word_tokenize:
>>> sentence = " ".join(sentence)
>>> pt = nltk
On 2022-03-07 14:08, Gonzalo V wrote:
Hello everyone.
i had upload a Django app to an ubuntu 18.04 server and it gives me the
same pdf everytime the view is called. To generate the pdf it receipts
differents string buy it gives me the same pdf. Could you give some idea
what is happening?
thanks
Op 4/03/2022 om 02:08 schreef Avi Gross via Python-list:
If Python was being designed TODAY, I wonder if a larger set of key words would
be marked as RESERVED for future expansion including ORELSE and even
NEVERTHELESS.
I think a better solution would be to have reserved words written lette
Thanks to MRAB and Chris Angelico for your help. Here is how I implemented the
string conversion, and it works correctly now for a library call that needs a
list converted to a string (error handling not shown):
PyObject* str_sentence = PyObject_Str(pSentence);
PyObject* separator = PyUnicode
16 matches
Mail list logo