Eryk
Many thanks. It is working perfectly now. See below for the reworked code.
Cheers
Mike
On 13/05/2022 1:42 pm, Eryk Sun wrote:
On 5/12/22, Mike Dewhirst wrote:
access=wr.KEY_ALL_ACCESS + wr.KEY_WRITE,
import winreg as wr class Registry: def __init__(self, computer=None,
On 5/12/22, Mike Dewhirst wrote:
>
> access=wr.KEY_ALL_ACCESS + wr.KEY_WRITE,
The access parameter is a bit mask of access rights that combine via
bitwise OR (|), not via arithmetic addition.
KEY_ALL_ACCESS (0x000F_003F) is a superset of KEY_WRITE (0x0002_0006):
KEY_WRITE = (
I'm trying to copy a value from HKLM to HKCU for application rollout via
bulk installation by an administrator but individual Windows user setup.
Getting this ...
Traceback (most recent call last):
File "D:\Users\mike\envs\chemdata\registry\wreg\wreg.py", line 84, in
The documentation says[1]
> Return the approximate size of the queue. Because of
> multithreading/multiprocessing semantics, this number is not
> reliable.
Are there any circumstances under which it *is* reliable? Most
germane, if I've added a bunch of items to the Queue, but not yet
launched
On 12May2022 19:48, Marco Sulla wrote:
>On Thu, 12 May 2022 at 00:50, Stefan Ram wrote:
>> There's no spec/doc, so one can't even test it.
>
>Excuse me, you're very right.
>
>"""
>A function that "tails" the file. If you don't know what that means,
>google "man tail"
>
>filepath: the file path
On Thu, 12 May 2022 22:45:42 +0200, Marco Sulla
declaimed the following:
>
>Maybe. Maybe not. What if the file ends with no newline?
https://github.com/coreutils/coreutils/blob/master/src/tail.c
Lines 567-569 (also lines 550-557 for "bytes_read" determination)
--
Wulfraed
Thank you very much. This helped me to improve the function:
import os
_lf = b"\n"
_err_n = "Parameter n must be a positive integer number"
_err_chunk_size = "Parameter chunk_size must be a positive integer number"
def tail(filepath, n=10, chunk_size=100):
if (n <= 0):
raise
On 11/05/2022 14.58, anthony.flury wrote:
Why not do :
def TempsOneDayDT(date:datetime.date):
return TempsOneDay(date.year, date.month, date.day)
No repeat of code - just a different interface to the same functionality.
Yeah, a one-line wrapper around the original
On 2022-05-12, Mats Wichmann wrote:
> On 5/12/22 10:25, Dan Stromberg wrote:
>> Hi folks.
>>
>> I heard there's a Windows-like "py" command for Linux (and Mac?).
>>
>> I'm finally getting to porting a particular project's Python 2.7 code to
>> 3.x, and one of the first steps will probably be
On 5/12/22 10:25, Dan Stromberg wrote:
> Hi folks.
>
> I heard there's a Windows-like "py" command for Linux (and Mac?).
>
> I'm finally getting to porting a particular project's Python 2.7 code to
> 3.x, and one of the first steps will probably be changing a lot of "python2
> script.py" to use
On Thu, 12 May 2022 at 00:50, Stefan Ram wrote:
>
> Marco Sulla writes:
> >def tail(filepath, n=10, chunk_size=100):
> >if (n <= 0):
> >raise ValueError(_err_n)
> ...
>
> There's no spec/doc, so one can't even test it.
Excuse me, you're very right.
"""
A function that "tails" the
On 2022-05-12 17:25, Dan Stromberg wrote:
Hi folks.
I heard there's a Windows-like "py" command for Linux (and Mac?).
I'm finally getting to porting a particular project's Python 2.7 code to
3.x, and one of the first steps will probably be changing a lot of "python2
script.py" to use
Hi folks.
I heard there's a Windows-like "py" command for Linux (and Mac?).
I'm finally getting to porting a particular project's Python 2.7 code to
3.x, and one of the first steps will probably be changing a lot of "python2
script.py" to use #!/usr/bin/env python2 and chmod +x. Then we can
>>def TempsOneDay(*dateComponents):
>>if len(dateComponents) == 3:
>>year, month, date = dateComponents
>>elif len(dateComponents) == 1 and isinstance(dateComponents[0],
>> datetime.date):
>>year, month, date = (dateComponents[0].year, dateComponents[0].month,
>>
Hi all,
It fills us with astronomical joy to announce the release of poliastro
0.16.3!
poliastro is an open source (MIT) pure Python library for interactive
Astrodynamics and Orbital Mechanics, with a focus on ease of use, speed,
and quick visualization. It provides a simple and intuitive API,
This is exactly as expected.
Strip removes any of the characters in the passed string from both the
front and the end of the string being stripped.
The letter 'T' from the start of 'The meaning of life' does not appear
in the word 'meaning' so nothing is removed from the start of the
On 10/05/2022 15:04, Dan Stromberg wrote:
On Tue, May 10, 2022 at 3:15 AM Chris Angelico wrote:
> It is often the case that developer write Code in Python and
then convert to a C extension module for performance regions.
>
> A C extension module has a lot of boiler plate code
17 matches
Mail list logo