Re: Avoid nested SIGINT handling

2021-11-10 Thread Jon Ribbens via Python-list
s://mail.python.org/mailman/listinfo/python-list

Re: Avoid nested SIGINT handling

2021-11-13 Thread Mladen Gogala via Python-list
antum expires or until initiates a synchronous I/O operation, as is the case with all normal read operations. BTW, that's the case on both Unix/Linux systems and Windows systems. -- Mladen Gogala Database Consultant https://dbwhisperer.wordpress.com -- https://mail.python.org/mailman/listinfo/python-list

Returning the index of a row in dataframe

2021-11-14 Thread Mahmood Naderan via Python-list
lobal stores" but the output is `None`. Any idea about that? Regards, Mahmood -- https://mail.python.org/mailman/listinfo/python-list

Re: Returning the index of a row in dataframe

2021-11-14 Thread Mahmood Naderan via Python-list
>>> df.iloc[1].name Correct I also see that 'df.index[1]' works fine. Thanks. Regards, Mahmood -- https://mail.python.org/mailman/listinfo/python-list

Using astype(int) for strings with thousand separator

2021-11-14 Thread Mahmood Naderan via Python-list
'1,024' How can I fix that? Any idea? Regards, Mahmood -- https://mail.python.org/mailman/listinfo/python-list

Re: Using astype(int) for strings with thousand separator

2021-11-15 Thread Mahmood Naderan via Python-list
> (see > https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_csv.html) Got it. Thanks. Regards, Mahmood -- https://mail.python.org/mailman/listinfo/python-list

Re: Proliferation of Python packaging formats

2021-11-17 Thread Jon Ribbens via Python-list
;s choice of TOML is absolutely risible, a language about which the only positive thing can be said is that it's not as bad as YAML, and for which Python doesn't even have a built-in parser - something that should have absolutely ruled it out as an option. -- https://mail.python.org/mailman/listinfo/python-list

get_axes not present?

2021-11-18 Thread Mahmood Naderan via Python-list
lotting/_matplotlib/core.py", line 903, in _get_subplots     ax for ax in self.axes[0].get_figure().get_axes() if isinstance(ax, Subplot) AttributeError: 'NoneType' object has no attribute 'get_axes' I guess there is a mismatch between versions. Is there any workaround for that? Regards, Mahmood -- https://mail.python.org/mailman/listinfo/python-list

Re: get_axes not present?

2021-11-18 Thread Mahmood Naderan via Python-list
Regards, Mahmood -- https://mail.python.org/mailman/listinfo/python-list

Re: get_axes not present?

2021-11-19 Thread Mahmood Naderan via Python-list
buteError: 'NoneType' object has no attribute 'get_axes' The error is weird. I have stick at this error... Any thoughts on that? Regards, Mahmood -- https://mail.python.org/mailman/listinfo/python-list

RE: Unexpected behaviour of math.floor, round and int functions (rounding)

2021-11-20 Thread Avi Gross via Python-list
e practical to have computers that have registers and circuitry that can multiply two such numbers in a very few cycles, and it may be done in stages in thousands of cycles, so use of something big like that might not be a good default. -- https://mail.python.org/mailman/listinfo/python-list

RE: Unexpected behaviour of math.floor, round and int functions (rounding)

2021-11-20 Thread Avi Gross via Python-list
n floats but on the design not accommodating the precision needed or perhaps on the algorithm used not necessarily being expected to reach a certain level. -Original Message- From: Python-list On Behalf Of Chris Angelico Sent: Saturday, November 20, 2021 5:17 PM To: python-list@python.or

Re: Unexpected behaviour of math.floor, round and int functions (rounding)

2021-11-20 Thread Rob Cliffe via Python-list
On 20/11/2021 22:59, Avi Gross via Python-list wrote: there are grey lines along the way where some mathematical proofs do weird things like IGNORE parts of a calculation by suggesting they are going to zero much faster than other parts and then wave a mathematical wand about what happens when

RE: Unexpected behaviour of math.floor, round and int functions (rounding)

2021-11-20 Thread Avi Gross via Python-list
om: Python-list On Behalf Of Grant Edwards Sent: Saturday, November 20, 2021 5:24 PM To: python-list@python.org Subject: Re: Unexpected behaviour of math.floor, round and int functions (rounding) On 2021-11-20, Ben Bacarisse wrote: > You seem to be agreeing with me. It's the floating

RE: Unexpected behaviour of math.floor, round and int functions (rounding)

2021-11-20 Thread Avi Gross via Python-list
not expected to apply for a non-abelian case. -Original Message- From: Python-list On Behalf Of Rob Cliffe via Python-list Sent: Saturday, November 20, 2021 6:19 PM To: Subject: Re: Unexpected behaviour of math.floor, round and int functions (rounding) On 20/11/2021 22:59, Avi Gross

Re: Unexpected behaviour of math.floor, round and int functions (rounding)

2021-11-20 Thread Rob Cliffe via Python-list
a repeating decimal but 14 and 10 are not coprime. I believe it is correct to say that infinitely recurring expansions occur when the denominator is divisible by a prime that does not divide the base. Rob Cliffe -- https://mail.python.org/mailman/listinfo/python-list

RE: Unexpected behaviour of math.floor, round and int functions (rounding)

2021-11-20 Thread Avi Gross via Python-list
comments unless something new is mentioned and it does relate to Python or similar programming languages. I am spending too much time today on this one and another in an R mailing list and other things elsewhere so my main plans for the day have fallen behind 😉 Avi -Original Message----- Fr

RE: Unexpected behaviour of math.floor, round and int functions (rounding)

2021-11-20 Thread Avi Gross via Python-list
- From: Python-list On Behalf Of Chris Angelico Sent: Saturday, November 20, 2021 8:03 PM To: python-list@python.org Subject: Re: Unexpected behaviour of math.floor, round and int functions (rounding) On Sun, Nov 21, 2021 at 11:39 AM Avi Gross via Python-list wrote: > > Can I suggest a

Re: get_axes not present?

2021-11-21 Thread Mahmood Naderan via Python-list
().get_axes() if isinstance(ax, Subplot) AttributeError: 'NoneType' object has no attribute 'get_axes' I am pretty sure that there is a version mismatch because on a system with Pandas 1.3.3 the output should be like https://imgur.com/a/LZ9eAzl Any feedback is appreciated. Regards, Mahmood -- https://mail.python.org/mailman/listinfo/python-list

Re: get_axes not present?

2021-11-21 Thread Mahmood Naderan via Python-list
egards, Mahmood -- https://mail.python.org/mailman/listinfo/python-list

Re: get_axes not present?

2021-11-21 Thread Mahmood Naderan via Python-list
lf._get_subplots()   File "/home/mnaderan/.local/lib/python3.8/site-packages/pandas/plotting/_matplotlib/core.py", line 903, in _get_subplots     ax for ax in self.axes[0].get_figure().get_axes() if isinstance(ax, Subplot) AttributeError: 'NoneType' object has no attribute 'get_axes' Any idea about that? Regards, Mahmood -- https://mail.python.org/mailman/listinfo/python-list

About get_axes() in Pandas 1.2.3

2021-11-22 Thread Mahmood Naderan via Python-list
s/pandas/plotting/_matplotlib/core.py", line 903, in _get_subplots ax for ax in self.axes[0].get_figure().get_axes() if isinstance(ax, Subplot) AttributeError: 'NoneType' object has no attribute 'get_axes' Although the plot() crashes, I see that row and axes variabl

Re: copy.copy

2021-11-22 Thread Jon Ribbens via Python-list
gt;>> a is b > True > > I was expecting False Why did you expect False? For immutable types, copy(foo) just returns foo. -- https://mail.python.org/mailman/listinfo/python-list

Re: About get_axes() in Pandas 1.2.3

2021-11-22 Thread Mahmood Naderan via Python-list
encies >without modifying anything on the host system. Thanks for the feedback. You are right. I agree that virtualenv is the most safest method at this time. Regards, Mahmood -- https://mail.python.org/mailman/listinfo/python-list

RE: pyinstaller wrong classified as Windows virus

2021-11-25 Thread Avi Gross via Python-list
something else entirely. -Original Message- From: Python-list On Behalf Of Ulli Horlacher Sent: Thursday, November 25, 2021 12:10 PM To: python-list@python.org Subject: Re: pyinstaller wrong classified as Windows virus Chris Angelico wrote: > Unfortunately, if you're not going

Re: Negative subscripts

2021-11-26 Thread Rob Cliffe via Python-list
y other techniques anyone can suggest, or is the only alternative to use if...then...else to cater for y = 0? Thanks Frank Millman -- https://mail.python.org/mailman/listinfo/python-list

Re: pyinstaller wrong classified as Windows virus

2021-11-28 Thread Tony Flury via Python-list
s and then they are gone. another reason to just distribute .py files. I cannot do that because my users do not have Python installed and they are not allowed to do it. -- https://mail.python.org/mailman/listinfo/python-list

Python child process in while True loop blocks parent

2021-11-29 Thread Jen Kris via Python-list
help if someone could suggest the best alternative for what I am doing here.  Thanks very much for any ideas.  -- https://mail.python.org/mailman/listinfo/python-list

Re: Python child process in while True loop blocks parent

2021-11-29 Thread Jen Kris via Python-list
hat's nonblocking by default.  The child will become more complex, but not in a way that affects polling.  And thanks for the tip about the c-string termination.  Nov 29, 2021, 14:12 by ba...@barrys-emacs.org: > > >> On 29 Nov 2021, at 20:36, Jen Kris via Python-list >&

Re: Python child process in while True loop blocks parent

2021-12-01 Thread Jen Kris via Python-list
useful to understand in detail what is behind os.open(). > > Barry > > > > >> >> >> Nov 29, 2021, 14:12 by >> ba...@barrys-emacs.org>> : >> >>> >>> >>>> On 29 Nov 2021, at 20:36, Jen Kris via Python-list <>>&g

Re: A decade or so of Python programming, and I've never thought to "for-elif"

2021-12-01 Thread Rob Cliffe via Python-list
p there. (For the record, since this was the last thing in the function, I just made the break a return. Alternatively, an extra indentation level "else: if name.isupper():" wouldn't have been that terrible.) Your random piece of amusement for today. ChrisA -- https://mail.python.org/mailman/listinfo/python-list

ANN: A new library for encryption and signing has been released.

2021-12-05 Thread Vinay Sajip via Python-list
https://github.com/vsajip/pagesign/issues/new/choose -- https://mail.python.org/mailman/listinfo/python-list

Re: Python child process in while True loop blocks parent

2021-12-05 Thread Jen Kris via Python-list
e opened as rdwr in Python because that's >>>> nonblocking by default.  The child will become more complex, but not in a >>>> way that affects polling.  And thanks for the tip about the c-string >>>> termination.  >>>> >>>> >&g

Re: Python child process in while True loop blocks parent

2021-12-05 Thread Jen Kris via Python-list
gt;> >>> Barry >>> >>> >>> >>>> >>>> >>>> >>>> Nov 30, 2021, 11:42 by >>>> ba...@barrys-emacs.org>>>> : >>>> >>>>> >>>>> >>>>> >>>>>> On 29 Nov 202

python list files and folder using tkinter

2021-12-05 Thread Pascal B via Python-list
contents) | | print("job adv listing files ok") -- https://mail.python.org/mailman/listinfo/python-list

Re: Python child process in while True loop blocks parent

2021-12-06 Thread Jen Kris via Python-list
t;).  You may be confused by the fact that threads are called light-weight processes.  Or maybe I'm confused :) If you have other information, please let me know.  Thanks.  Jen Dec 5, 2021, 18:08 by hjp-pyt...@hjp.at: > On 2021-12-06 00:51:13 +0100, Jen Kris via Python-list wrote: >

Re: Python child process in while True loop blocks parent

2021-12-06 Thread Jen Kris via Python-list
@barrys-emacs.org: > > >> On 6 Dec 2021, at 17:09, Jen Kris via Python-list >> wrote: >> >> I can't find any support for your comment that "Fork creates a new >> process and therefore also a new thread." From the Linux man pages >> htt

Re: Return

2021-12-07 Thread Roland Mueller via Python-list
ame__ == "__main__": print(f"f(): {f()}") print(f"g(): {g()}") print(f"h(): {h()}") Result: f(): 42 g(): None h(): None Pydoc: $ pydoc return BR, Roland > Thanks > Vani > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list

Re: HTML extraction

2021-12-07 Thread Roland Mueller via Python-list
ot a lot of code, pretty straight-forward. > On the other hand, if you're trying to do an "HTML to text" > conversion, you'd probably need to be aware of which tags are > block-level and which are inline content, so that (for instance) > "Hello world" wou

Re: Python child process in while True loop blocks parent

2021-12-08 Thread Jen Kris via Python-list
m a separate physical pthread.  >> That would certainly eliminate the overhead of creating a new pthread.  >> > > Forget about physical threads, they only matter when you are performance > tuning your code. > > >> I am working now to finish this, and I will try your suggestion of calling >> fork-execv from the "main" thread.  When I reply back next I can give you a >> complete picture of what I'm doing.  >> >> Your comments, and those of Peter Holzer and Chris Angelico, are most >> appreciated.  >> > > Barry > > > -- https://mail.python.org/mailman/listinfo/python-list

ANN: distlib 0.3.4 released on PyPI

2021-12-08 Thread Vinay Sajip via Python-list
ps://pypi.org/project/distlib/0.3.4/ [2] https://distlib.readthedocs.io/en/0.3.4/ [3] https://bitbucket.org/pypa/distlib/issues/new -- https://mail.python.org/mailman/listinfo/python-list

Re: Short, perfect program to read sentences of webpage

2021-12-08 Thread Jon Ribbens via Python-list
s. -- https://mail.python.org/mailman/listinfo/python-list

Re: Return

2021-12-09 Thread Roland Müller via Python-list
and Thanks Vani -- https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list

Isn't TypeError built in?

2021-12-12 Thread Mike Dewhirst via Python-list
and be sure it came from me. Just ask and I'll send it to you. Your email software can handle signing. OpenPGP_signature Description: OpenPGP digital signature -- https://mail.python.org/mailman/listinfo/python-list

Re: Isn't TypeError built in?

2021-12-13 Thread Mike Dewhirst via Python-list
On 13/12/2021 12:42 pm, Chris Angelico wrote: On Mon, Dec 13, 2021 at 12:31 PM Mike Dewhirst via Python-list wrote: Obviously something is wrong elsewhere but I'm not sure where to look. Ubuntu 20.04 with plenty of RAM. def __del__(self): try: for context_o

Re: Advanced ways to get object information from within python

2021-12-23 Thread Robert Latest via Python-list
selector', 'signals', 'spiders', 'twisted_version', > 'utils', 'version_info'] > > I wish there was a convenient way for me to know what all of these are. ['%s: %s' % (x, type(getattr(scrapy, x))) for x in dir(scrapy)] -- https://mail.python.org/mailman/listinfo/python-list

Re: Isn't TypeError built in?

2021-12-25 Thread Mike Dewhirst via Python-list
s and describe it.Fyi, there was nothing out of kilter in the machine. It was in production and is stable.CheersMike--(Unsigned mail from my phone) Original message From: "Peter J. Holzer" Date: 26/12/21 06:19 (GMT+10:00) To: python-list@python.org Subject: Re:

RE: recover pickled data: pickle data was truncated

2021-12-29 Thread Avi Gross via Python-list
checking it. But corruption can happen for many reasons including at the level of the disk it is written to. -Original Message- From: Python-list On Behalf Of iMath Sent: Wednesday, December 29, 2021 10:51 AM To: python-list@python.org Subject: Re: recover pickled data: pickle data was

RE: builtins.TypeError: catching classes that do not inherit from BaseException is not allowed

2021-12-30 Thread Avi Gross via Python-list
integers though, ... -Original Message- From: Python-list On Behalf Of hongy...@gmail.com Sent: Thursday, December 30, 2021 6:27 PM To: python-list@python.org Subject: Re: builtins.TypeError: catching classes that do not inherit from BaseException is not allowed On Friday, December 31

RE: builtins.TypeError: catching classes that do not inherit from BaseException is not allowed

2021-12-31 Thread Avi Gross via Python-list
You can design tree structures in ways that allow them to be traversed in an iterative way such as having bi-directional links along with flags that mark where you entered a node from or already visited. Tools should be tools, not religions. -Original Message----- From: Python-list On Be

Re: What to write or search on github to get the code for what is written below:

2022-01-07 Thread Avi Gross via Python-list
ost of the work and is just stuck somewhere, I, personally, feel no need to offer any guidance.  -Original Message- From: Chris Angelico To: python-list@python.org Sent: Fri, Jan 7, 2022 2:57 pm Subject: Re: What to write or search on github to get the code for what is written below: O

Extracting dataframe column with multiple conditions on row values

2022-01-07 Thread Mahmood Naderan via Python-list
there any way to use built-in function for a more efficient code? Regards, Mahmood -- https://mail.python.org/mailman/listinfo/python-list

Re: Extracting dataframe column with multiple conditions on row values

2022-01-08 Thread Avi Gross via Python-list
print(second[2]) I get a 6 as an answer and suppose it could be done in one more complex  expression if needed! LOL! -Original Message- From: Edmondo Giovannozzi To: python-list@python.org Sent: Sat, Jan 8, 2022 8:00 am Subject: Re: Extracting dataframe column with multiple conditions

Re: What to write or search on github to get the code for what is written below:

2022-01-09 Thread Avi Gross via Python-list
start with, that may be lots of extra work. And it is not python alone what might require work but other languages like R too.  Perhaps I missed a better description of the design. -Original Message- From: Dennis Lee Bieber To: python-list@python.org Sent: Sun, Jan 9, 2022 1:08 pm Subject

Re: What to write or search on github to get the code for what is written below:

2022-01-13 Thread Avi Gross via Python-list
rg/mailman/listinfo/python-list

Re: keep getting a syntax error on the very first program I am running

2022-01-14 Thread Jon Ribbens via Python-list
; >input("\n\nPress the enter key to exit.") You're only supposed to enter the lines: print("Hello World") and input("\n\nPress the enter key to exit.") The other lines are showing you the output you should see. -- https://mail.python.org/mailman/listinfo/python-list

Writing a string with comma in one column of CSV file

2022-01-15 Thread Mahmood Naderan via Python-list
x27;,' and this causes the final CSV file to have more than 2 columns, while I want to write the whole key as a single column. I know that wr.writerow([key]) writes the entire key in one column, but I would like to do the same with write(). Any idea to fix that? Regards, Mahmood -- https://mail.python.org/mailman/listinfo/python-list

Re: What to write or search on github to get the code for what is written below:

2022-01-15 Thread Avi Gross via Python-list
Mats, Yes, this is a Python mailing list and I welcome people interested in doing something in Python who need a little help or advice but have some idea of what they are doing and present us with enough info more than "something does not work." Yes, the topic was raised on a Python

Re: Writing a string with comma in one column of CSV file

2022-01-15 Thread Mahmood Naderan via Python-list
Right. I was also able to put all columns in a string and then use writerow(). Thanks. Regards, Mahmood On Saturday, January 15, 2022, 10:33:08 PM GMT+1, alister via Python-list wrote: On Sat, 15 Jan 2022 20:56:22 + (UTC), Mahmood Naderan wrote: > Hi, > I use the fol

Re: Writing a string with comma in one column of CSV file

2022-01-15 Thread Avi Gross via Python-list
st a thought. If you like your way, fine, I see another reply suggesting how to hide the commas but that can be a problem if humans read and edit the results in the external file and do not follow through. -Original Message- From: Mahmood Naderan via Python-list To: DL Neil via Python-

Re: What to write or search on github to get the code for what is written below:

2022-01-17 Thread Avi Gross via Python-list
working set of software first. Good luck with that.  -Original Message- From: NArshad To: python-list@python.org Sent: Mon, Jan 17, 2022 4:55 am Subject: Re: What to write or search on github to get the code for what is written below: Avi Gross: -“They just were hoping someone would post

Trouble downloading Python

2022-01-18 Thread Renda Saptoe via Python-list
Good day, I am experiencing issues trying to download Python. I would please need some assistance to help download the progam to my laptop. Kind regards Renda -- https://mail.python.org/mailman/listinfo/python-list

Re: What to write or search on github to get the code for what is written below:

2022-01-18 Thread Avi Gross via Python-list
think this group has already spent way too much time on whatever this issue is and provided lots of useful advice which apparently does not get taken. So don't pull me in again. I have moved on. -Original Message- From: Dennis Lee Bieber To: python-list@python.org Sent: Tue, Jan 18,

Puzzling behaviour of Py_IncRef

2022-01-19 Thread Tony Flury via Python-list
assertEqual fails - suggesting that the refcount of 'node' is actually only 1 when the 'test_ref' method exits. Can someone explain why the 'test_ref' method fails to change the refcount of the 'node' instance. -- https://mail.python.org/mailman/listinfo/python-list

Re: Puzzling behaviour of Py_IncRef

2022-01-19 Thread Tony Flury via Python-list
On 19/01/2022 11:09, Chris Angelico wrote: On Wed, Jan 19, 2022 at 10:00 PM Tony Flury via Python-list wrote: Extension function : static PyObject *_Node_test_ref_count(PyObject *self) { printf("\nIncrementing ref count for self - just for the hell of

"undefined symbol" in C extension module

2022-01-22 Thread Robert Latest via Python-list
lib.linux-x86_64-3.10/ spam.cpython-310-x86_64-linux-gnu.so) [and more of the same] It seems that I need to install some library to make this work, but which one? -- https://mail.python.org/mailman/listinfo/python-list

Re: What to write or search on github to get the code for what is written below:

2022-01-22 Thread Avi Gross via Python-list
time to learn, then either tell them you can't do it or get someone hired. But note, in the latter case you need to stop wasting time and tell them in great detail what you want done and let them see the data and so on. Otherwise, you may pay for lots of hours or have people walk away.

Re: "undefined symbol" in C extension module

2022-01-23 Thread Robert Latest via Python-list
s. Turns out I tried to revive a package from v2.7. Need to adapt it to 3.x -- https://mail.python.org/mailman/listinfo/python-list

Re: Pandas or Numpy

2022-01-23 Thread Avi Gross via Python-list
Message- From: Julius Hamilton To: Chris Angelico Cc: python-list@python.org Sent: Sun, Jan 23, 2022 1:05 pm Subject: Re: Pandas or Numpy Hey, I don’t know but in case you don’t get other good answers, I’m pretty sure Numpy is more of a mathematical library and Pandas is definitely for handling

Re: Puzzling behaviour of Py_IncRef

2022-01-25 Thread Tony Flury via Python-list
erly bizzare behaviour - it obviously works, but why. -- Anthony Flury email : anthony.fl...@btinternet.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Puzzling behaviour of Py_IncRef

2022-01-25 Thread Tony Flury via Python-list
On 25/01/2022 22:28, Barry wrote: On 25 Jan 2022, at 14:50, Tony Flury via Python-list wrote:  On 20/01/2022 23:12, Chris Angelico wrote: On Fri, 21 Jan 2022 at 10:10, Greg Ewing wrote: On 20/01/22 12:09 am, Chris Angelico wrote: At this point, the refcount has indeed been increased

Re: Puzzling behaviour of Py_IncRef

2022-01-26 Thread Tony Flury via Python-list
On 26/01/2022 01:29, MRAB wrote: On 2022-01-25 23:50, Tony Flury via Python-list wrote: On 25/01/2022 22:28, Barry wrote: On 25 Jan 2022, at 14:50, Tony Flury via Python-list  wrote:  On 20/01/2022 23:12, Chris Angelico wrote: On Fri, 21 Jan 2022 at 10:10, Greg Ewing  wrote: On 20/01

Re: Puzzling behaviour of Py_IncRef

2022-01-26 Thread Tony Flury via Python-list
On 26/01/2022 08:20, Chris Angelico wrote: On Wed, 26 Jan 2022 at 19:04, Tony Flury via Python-list wrote: So according to that I should increment twice if and only if the calling code is using the result - which you can't tell in the C code - which is very odd behaviour. No, the r

Re: Puzzling behaviour of Py_IncRef

2022-01-26 Thread Tony Flury via Python-list
that decrement - the decrement behavior is in the Python runtime. -- Anthony Flury email :anthony.fl...@btinternet.com -- https://mail.python.org/mailman/listinfo/python-list -- Anthony Flury email :anthony.fl...@btinternet.com -- Anthony Flury email : anthony.fl...@btinterne

Re: Starting using Python

2022-01-27 Thread Tony Flury via Python-list
se any particular file system until you start implement features such as packages which are not something a beginner should ever worry about. -- Anthony Flury email : anthony.fl...@btinternet.com -- https://mail.python.org/mailman/listinfo/python-list

Data unchanged when passing data to Python in multiprocessing shared memory

2022-02-01 Thread Jen Kris via Python-list
efers to shm00.buf, using the buffer protocol.  Is that the reason that Python can't see the data that has been updated by another language?  So my question is, how can I alter the data in shared memory in a non-Python language to pass back to Python?  Thanks, Jen -- https://mail.python.org/mailman/listinfo/python-list

Re: Data unchanged when passing data to Python in multiprocessing shared memory

2022-02-01 Thread Jen Kris via Python-list
ig endian.  However, if anyone on this list knows how to pass data from a non-Python language to Python in multiprocessing.shared_memory please let me (and the list) know.  Thanks.  Feb 1, 2022, 14:20 by ba...@barrys-emacs.org: > > >> On 1 Feb 2022, at 20:26, Jen Kris via Pyth

Re: Data unchanged when passing data to Python in multiprocessing shared memory

2022-02-02 Thread Avi Gross via Python-list
m: Dennis Lee Bieber To: python-list@python.org Sent: Wed, Feb 2, 2022 12:30 am Subject: Re: Data unchanged when passing data to Python in multiprocessing shared memory On Wed, 2 Feb 2022 00:40:22 +0100 (CET), Jen Kris declaimed the following: > > breakup = int.from_bytes(byte_va

Re: Data unchanged when passing data to Python in multiprocessing shared memory

2022-02-02 Thread Jen Kris via Python-list
on a > different OS? (Windows vs Linux) > > > > -- > Wulfraed Dennis Lee Bieber AF6VN > wlfr...@ix.netcom.comhttp://wlfraed.microdiversity.freeddns.org/ > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list

Re: Data unchanged when passing data to Python in multiprocessing shared memory

2022-02-02 Thread Jen Kris via Python-list
An ASCII string will not work.  If you convert 32894 to an ascii string you will have five bytes, but you need four.  In my original post I showed the C program I used to convert any 32-bit number to 4 bytes.  Feb 2, 2022, 10:16 by python-list@python.org: > I applaud trying to find the ri

Waht do you think about my repeated_timer class

2022-02-02 Thread Cecil Westerhof via Python-list
ning = False -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof -- https://mail.python.org/mailman/listinfo/python-list

Re: Waht do you think about my repeated_timer class

2022-02-02 Thread Cecil Westerhof via Python-list
cessary, but if you want a good Pythonic way to show > the beginning and end of its use area, a 'with' block is the way to > go.) I will look into that. -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof -- https://mail.python.org/mailman/listinfo/python-list

Re: Waht do you think about my repeated_timer class

2022-02-02 Thread Cecil Westerhof via Python-list
s_running = True self._next() def stop(self): if self._is_running: self._timer.cancel() self._timer = None self._is_running = False -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof -- https://mail.python.org/mailman/listinfo/python-list

Re: Data unchanged when passing data to Python in multiprocessing shared memory

2022-02-02 Thread Avi Gross via Python-list
aside and the string use a null terminator if shorter. Of course if this big-endian issue also scrambles bytes used in strings, forget it. Or, maybe shared memory is not the easy way to go, even it it might be faster. -Original Message- From: Jen Kris To: Avi Gross Cc: python-list

Re: Waht do you think about my repeated_timer class

2022-02-02 Thread Cecil Westerhof via Python-list
nce(interval, (int,float)): > > which handles subclasses of these types (but note that bool subclasses > int :-) Done, thanks. -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof -- https://mail.python.org/mailman/listinfo/python-list

Re: Waht do you think about my repeated_timer class

2022-02-02 Thread Cecil Westerhof via Python-list
e > default; you don't need to say "class X(object)"), which will > automatically give your object all the methods of a timer. Of-course. I should have thought about that. :'-( -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof -- https://mail.python.org/mailman/listinfo/python-list

Re: Waht do you think about my repeated_timer class

2022-02-02 Thread Cecil Westerhof via Python-list
ng? -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof -- https://mail.python.org/mailman/listinfo/python-list

Re: Waht do you think about my repeated_timer class

2022-02-02 Thread Cecil Westerhof via Python-list
> self._next() > self._is_running = True > > def stop(self): > if self._is_running: > self._timer.cancel() > self._timer = None > self._is_running = False -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof -- https://mail.python.org/mailman/listinfo/python-list

Re: Waht do you think about my repeated_timer class

2022-02-02 Thread Cecil Westerhof via Python-list
Chris Angelico writes: > On Thu, 3 Feb 2022 at 15:43, Cecil Westerhof via Python-list > wrote: >> >> Chris Angelico writes: >> >> >> > (Side point: The OP's code is quite inefficient, as it creates a new >> >> > thread for each reitera

Re: Waht do you think about my repeated_timer class

2022-02-03 Thread Cecil Westerhof via Python-list
Barry writes: >> On 3 Feb 2022, at 04:45, Cecil Westerhof via Python-list >> wrote: >> >> Have to be careful that timing keeps correct when target takes a 'lot' >> of time. >> Something to ponder about, but can wait. > > You have noticed

Re: Waht do you think about my repeated_timer class

2022-02-04 Thread Cecil Westerhof via Python-list
name … The class starts a thread where every by the user defined interval a by the user define function is called. -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof -- https://mail.python.org/mailman/listinfo/python-list

Re: Waht do you think about my repeated_timer class

2022-02-04 Thread Cecil Westerhof via Python-list
Ethan Furman writes: > On 2/4/22 6:28 AM, Cecil Westerhof via Python-list wrote: > >> It was already not a good name, but I am rewriting the class >> completely, so now the name is a complete bumper. (No more timer.) I >> am thinking about naming the class repeating_

Re: Waht do you think about my repeated_timer class

2022-02-04 Thread Cecil Westerhof via Python-list
Igor Berger writes: > On Friday, February 4, 2022 at 12:28:53 PM UTC-5, Cecil Westerhof wrote: >> Ethan Furman writes: >> >> > On 2/4/22 6:28 AM, Cecil Westerhof via Python-list wrote: >> > >> >> It was already not a good name, but I am rewriting

RuntimeError, or user defined exception

2022-02-04 Thread Cecil Westerhof via Python-list
Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof -- https://mail.python.org/mailman/listinfo/python-list

Re: Waht do you think about my repeated_timer class

2022-02-04 Thread Cecil Westerhof via Python-list
Chris Angelico writes: > On Sat, 5 Feb 2022 at 04:33, Cecil Westerhof via Python-list > wrote: >> >> Ethan Furman writes: >> >> > On 2/4/22 6:28 AM, Cecil Westerhof via Python-list wrote: >> > >> >> It was already not a good name, but I am

Re: Waht do you think about my repeated_timer class

2022-02-04 Thread Avi Gross via Python-list
time_after_time But to be more pythonic, throw some double underscores before and after. -Original Message- From: Igor Berger To: python-list@python.org Sent: Fri, Feb 4, 2022 12:40 pm Subject: Re: Waht do you think about my repeated_timer class On Friday, February 4, 2022 at 12:28:53

Re: Openning Python program

2022-02-07 Thread Cecil Westerhof via Python-list
I think he did a great job of showing a vulnerability. But it was not appreciated and he was fired. :'-( -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof -- https://mail.python.org/mailman/listinfo/python-list

Re: Openning Python program

2022-02-07 Thread Cecil Westerhof via Python-list
t his little experiment showed. -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof -- https://mail.python.org/mailman/listinfo/python-list

Re: Openning Python program

2022-02-08 Thread Cecil Westerhof via Python-list
Chris Angelico writes: > On Tue, 8 Feb 2022 at 06:51, Cecil Westerhof via Python-list > wrote: >> >> Chris Angelico writes: >> >> >> > How difficult would it be to get people to read those lines, though? >> >> >> >> That d

Can't get iterator in the C API

2022-02-08 Thread Jen Kris via Python-list
= PySeqIter_Check(pFidMod); pFidSeqIter  = PySeqIter_New(pFidMod); So the C API thinks gutenberg.fileids is not iterable, but it is.  What am I doing wrong? -- https://mail.python.org/mailman/listinfo/python-list

<    25   26   27   28   29   30   31   32   33   34   >