[winreg] How to access "(Default)" key value?

2022-05-03 Thread Nicolas Formichella
Hello, I am encountering an issue with winreg, I can't figure out how to read the "(Default)" of a registry value ``` def get_chrome_version() -> str: with winreg.ConnectRegistry(None, winreg.HKEY_CURRENT_USER) as registry: with winreg.OpenKeyEx(registry, r"Software\Microsoft\Window

Re: Match.groupdict: Meaning of default argument?

2022-05-03 Thread Loris Bennett
r...@zedat.fu-berlin.de (Stefan Ram) writes: > "Loris Bennett" writes: >>I thought that 'days' would default to '0'. > > It will get the value '0' if (?P\d*) does > /not/ participate in the match. > > In your case, it /does/ participate in the match, > \d* matching the empty string. > >

Re: Match.groupdict: Meaning of default argument?

2022-05-03 Thread Loris Bennett
Julio Di Egidio writes: > On Friday, 29 April 2022 at 09:50:08 UTC+2, Loris Bennett wrote: >> Hi, >> >> If I do >> >> import re >> pattern = >> re.compile(r'(?P\d*)(-?)(?P\d\d):(?P\d\d):(?P\d\d)') >> s = '104-02:47:06' >> match = pattern.search(s) >> match_dict = match.groupdict('0') >>

Re: Match.groupdict: Meaning of default argument?

2022-05-03 Thread Loris Bennett
"Loris Bennett" writes: > r...@zedat.fu-berlin.de (Stefan Ram) writes: > >> "Loris Bennett" writes: >>>I thought that 'days' would default to '0'. >> >> It will get the value '0' if (?P\d*) does >> /not/ participate in the match. >> >> In your case, it /does/ participate in the match, >>

Re: [winreg] How to access "(Default)" key value?

2022-05-03 Thread MRAB
On 2022-05-03 10:31, Nicolas Formichella wrote: Hello, I am encountering an issue with winreg, I can't figure out how to read the "(Default)" of a registry value ``` def get_chrome_version() -> str: with winreg.ConnectRegistry(None, winreg.HKEY_CURRENT_USER) as registry: with win

python 3.9.12 and python 3.10

2022-05-03 Thread Dave Francis
Date: Tue, 3 May 2022 19:59:08 +0100 Subject: python 3.9.12 and python 3.10 I installed 3.9 and am able to enter simple code which runs. If I type an error I can highlight it but cannot copy or delete it. I looked for help & found 3.10 and installed it but when I selected the python icon 3.9 appear

Re: Difference in Setup Between Windows 10 Running Python 3.9 and Windows 11 Running Python 3.10

2022-05-03 Thread Eryk Sun
On 5/1/22, Brent Hunter wrote: > > I was recently running a Windows 10 machine Python 3.9. I simply created a > batch file titled "Start-AIG.bat" which simply contained the following: > "pythonw AIG.py". It started a python program titled "AIG.py" and the > Python dialog box was displayed on my