Re: win32clipboard writing to clipboard on Windows 11
On 6/17/2024 9:30 PM, MRAB via Python-list wrote: On 2024-06-17 20:27, Rob Cliffe via Python-list wrote: Recently I acquired a new laptop running WIndows 11; my previous one uses WIndows 10. I encountered a strange problem: I am using the win32clipboard backage (part of pywin32), and when I use SetClipboardData() to write text which consists ***entirely of digits*** to the clipboard, I either get an error (not always the same error message) or a program crash. The problem does not appear if I use SetClipboardText() instead. The problem does not occur on my old machine (where I used the feature extensively). Sample program: from win32clipboard import * OpenClipboard() SetClipboardData(CF_UNICODETEXT, "A") SetClipboardData(CF_UNICODETEXT, "A0") SetClipboardData(CF_UNICODETEXT, "0A") SetClipboardText("0", CF_UNICODETEXT) print("OK so far") SetClipboardData(CF_UNICODETEXT, "0") CloseClipboard() Sample output: OK so far Traceback (most recent call last): File "C:\TEST*.PY", line 8, in SetClipboardData(CF_UNICODETEXT, "0") pywintypes.error: (0, 'SetClipboardData', 'No error message is available') Can anyone shed light on this? Best wishes Rob Cliffe I tried it on Windows 10 and got this: >>> from win32clipboard import * >>> OpenClipboard() >>> SetClipboardData(CF_UNICODETEXT, "A") 1830508101640 >>> CloseClipboard() >>> OpenClipboard() >>> SetClipboardData(CF_UNICODETEXT, "0") Traceback (most recent call last): File "", line 1, in pywintypes.error: (6, 'SetClipboardData', 'The handle is invalid.') >>> CloseClipboard() It looks like it's something to memory ownership: https://stackoverflow.com/questions/1264137/how-to-copy-string-to-clipboard-in-c If you're putting text on the clipboard, why not just use SetClipboardText()? That's what I do. If you can make a change, and you only need to work with text on the clipboard, you could change to use pyperclip. It also works on Linux, if you might care about that in the future. It's available as a pip install. It's easier to use than the win32 approach. -- https://mail.python.org/mailman/listinfo/python-list
Re: win32clipboard writing to clipboard on Windows 11
On 2024-06-17 20:27, Rob Cliffe via Python-list wrote: Recently I acquired a new laptop running WIndows 11; my previous one uses WIndows 10. I encountered a strange problem: I am using the win32clipboard backage (part of pywin32), and when I use SetClipboardData() to write text which consists ***entirely of digits*** to the clipboard, I either get an error (not always the same error message) or a program crash. The problem does not appear if I use SetClipboardText() instead. The problem does not occur on my old machine (where I used the feature extensively). Sample program: from win32clipboard import * OpenClipboard() SetClipboardData(CF_UNICODETEXT, "A") SetClipboardData(CF_UNICODETEXT, "A0") SetClipboardData(CF_UNICODETEXT, "0A") SetClipboardText("0", CF_UNICODETEXT) print("OK so far") SetClipboardData(CF_UNICODETEXT, "0") CloseClipboard() Sample output: OK so far Traceback (most recent call last): File "C:\TEST*.PY", line 8, in SetClipboardData(CF_UNICODETEXT, "0") pywintypes.error: (0, 'SetClipboardData', 'No error message is available') Can anyone shed light on this? Best wishes Rob Cliffe I tried it on Windows 10 and got this: >>> from win32clipboard import * >>> OpenClipboard() >>> SetClipboardData(CF_UNICODETEXT, "A") 1830508101640 >>> CloseClipboard() >>> OpenClipboard() >>> SetClipboardData(CF_UNICODETEXT, "0") Traceback (most recent call last): File "", line 1, in pywintypes.error: (6, 'SetClipboardData', 'The handle is invalid.') >>> CloseClipboard() It looks like it's something to memory ownership: https://stackoverflow.com/questions/1264137/how-to-copy-string-to-clipboard-in-c If you're putting text on the clipboard, why not just use SetClipboardText()? That's what I do. -- https://mail.python.org/mailman/listinfo/python-list
Re: Anonymous email users
On 18/06/24 05:29, Roel Schroeven via Python-list wrote: AVI GROSS via Python-list schreef op 17/06/2024 om 17:03: I simply am thinking that people who do not allow me to easily reply to them directly, should be ignored by me and not get my cooperation that way. FWIW, personally I (mostly) don't see the point of replying to people personally. To me a public mailing list is much like any public forum, where my expectation is that conversations happen in public. To me it always feels weird when I get a personal reply when I make a public post in a mailing list. I mostly ignore those, unless there's really something in it that's best kept out of the public. Sometimes people write long mails with wandering thoughts only loosely related to the topic at hand directly to me instead of to the whole list. My take is: if it's not on-topic enough for the list, it's not on-topic enough for me either. Not that it bothers me *that* much; I just ignore those. It's very well possible that's just me, and that other people have different expectations. +1 The "public" part is not to embarrass posters, but recognition that there are likely other people 'out there' (or arriving in-future if they care to read the archives) experiencing a similar problem. (hence need for descriptive Subject lines - isn't the most difficult task in programming 'choosing names'?) Yes, like @Avi, I have been known to contact folk directly. However, such for personal purposes - as distinct from the list, and possibly subjects OT for the list. When contacted by others off-list, I play it by ear - ignore, personal, or post response on-list. (some lists/email-clients do seem to prefer personal replies, even when incoming message is from a list - so easy accident.) The Delete-key is your friend! -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list
RE: Anonymous email users
It seems clear we have people on mailing lists that see it as a purely public forum, and that is fine for them. I have found plenty of times I choose not to continue in public and waste time for people as in this reply on a topic I raised and now will move away from. I have in the past, for example, offered to help people and participate in aspects of their project that do not need to be viewed here, such as helping them find out how to adjust their graphical output to better fit their needs. Or, if someone mentions me negatively, I prefer not always replying in public to perhaps see if I misunderstood something or was misunderstood. I have lots of people I "met" in places like this that I keep in touch with privately and see that as a plus. For those who just want a business-like experience, no problem. For those who choose levels of anonymity or don't like being contacted, again, fine for them. The reality is that I have found people who show up in forums looking almost legit but actually are not at all who they appear or claim to be even when they have valid email addresses like mrsp...@gmail.com or even use names of real people you can search for on the internet but who are not actually the ones they may even claim. My message was not to say what people could not do, but to point out they may be missing out on what some see as collateral opportunities. The people I have helped privately would not have received it had they only participated through the group and I would not have received some chances to learn if I could not ask questions in private that clearly did not fit the purpose of the group. So, I am outa this conversation IN PUBLIC. LOL! -Original Message- From: Python-list On Behalf Of Grant Edwards via Python-list Sent: Monday, June 17, 2024 5:08 PM To: python-list@python.org Subject: Re: Anonymous email users On 2024-06-17, Roel Schroeven via Python-list wrote: > FWIW, personally I (mostly) don't see the point of replying to people > personally. To me a public mailing list is much like any public forum, > where my expectation is that conversations happen in public. To me it > always feels weird when I get a personal reply when I make a public post > in a mailing list. I mostly ignore those, unless there's really > something in it that's best kept out of the public. My sentiments exactly. I generally don't even read replies that get mailed to me. They almost always seem to be copies of replies that were also posted to the mailing list (which I read using an NNTP client pointed at news.gmane.io). -- Grant -- https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list
Re: Anonymous email users
On 2024-06-17, Roel Schroeven via Python-list wrote: > FWIW, personally I (mostly) don't see the point of replying to people > personally. To me a public mailing list is much like any public forum, > where my expectation is that conversations happen in public. To me it > always feels weird when I get a personal reply when I make a public post > in a mailing list. I mostly ignore those, unless there's really > something in it that's best kept out of the public. My sentiments exactly. I generally don't even read replies that get mailed to me. They almost always seem to be copies of replies that were also posted to the mailing list (which I read using an NNTP client pointed at news.gmane.io). -- Grant -- https://mail.python.org/mailman/listinfo/python-list
win32clipboard writing to clipboard on Windows 11
Recently I acquired a new laptop running WIndows 11; my previous one uses WIndows 10. I encountered a strange problem: I am using the win32clipboard backage (part of pywin32), and when I use SetClipboardData() to write text which consists ***entirely of digits*** to the clipboard, I either get an error (not always the same error message) or a program crash. The problem does not appear if I use SetClipboardText() instead. The problem does not occur on my old machine (where I used the feature extensively). Sample program: from win32clipboard import * OpenClipboard() SetClipboardData(CF_UNICODETEXT, "A") SetClipboardData(CF_UNICODETEXT, "A0") SetClipboardData(CF_UNICODETEXT, "0A") SetClipboardText("0", CF_UNICODETEXT) print("OK so far") SetClipboardData(CF_UNICODETEXT, "0") CloseClipboard() Sample output: OK so far Traceback (most recent call last): File "C:\TEST*.PY", line 8, in SetClipboardData(CF_UNICODETEXT, "0") pywintypes.error: (0, 'SetClipboardData', 'No error message is available') Can anyone shed light on this? Best wishes Rob Cliffe -- https://mail.python.org/mailman/listinfo/python-list
Re: Anonymous email users
AVI GROSS via Python-list schreef op 17/06/2024 om 17:03: I simply am thinking that people who do not allow me to easily reply to them directly, should be ignored by me and not get my cooperation that way. FWIW, personally I (mostly) don't see the point of replying to people personally. To me a public mailing list is much like any public forum, where my expectation is that conversations happen in public. To me it always feels weird when I get a personal reply when I make a public post in a mailing list. I mostly ignore those, unless there's really something in it that's best kept out of the public. Sometimes people write long mails with wandering thoughts only loosely related to the topic at hand directly to me instead of to the whole list. My take is: if it's not on-topic enough for the list, it's not on-topic enough for me either. Not that it bothers me *that* much; I just ignore those. It's very well possible that's just me, and that other people have different expectations. But I don't go hiding my email address, that's a whole different kettle. -- "Let everything happen to you Beauty and terror Just keep going No feeling is final" -- Rainer Maria Rilke -- https://mail.python.org/mailman/listinfo/python-list
RE: Anonymous email users
Thanks, Marco, for explaining. I, personally, have no interest in finding out who people are in this case. I simply am thinking that people who do not allow me to easily reply to them directly, should be ignored by me and not get my cooperation that way. I do understand reasons people use fake ID but note others have put their email address in their signature, perhaps slightly disguised as in: Myname=ereweon.com Or myn...@unspecified.tb s/unspecified.tb/yahoo.com/ It may be the gateway or other records can find them if they are nasty, but for now, it is just an observation that it seems the discussions with people in the email list are more useful to me. -Original Message- From: Python-list On Behalf Of Marco Moock via Python-list Sent: Saturday, June 15, 2024 2:03 AM To: python-list@python.org Subject: Re: Anonymous email users On 15.06.2024 um 10:30 Uhr dn wrote: > These mailing-lists all run under the Python Code of Conduct. > > This also effects a conundrum. Firstly, that someone abusing others > (for example) shall be held responsible. Secondly, that in order to > hold someone responsible, he/she/... must be identifiable. The mailing list has a Usenet gateway Those users use the Usenet to post. Check the Injection-Info header for the address of the news server operator. He can identify the account that posted it. -- kind regards Marco Send spam to 1718440236mu...@cartoonies.org -- https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list
Re: Anonymous email users
On 15.06.2024 um 10:30 Uhr dn wrote: > These mailing-lists all run under the Python Code of Conduct. > > This also effects a conundrum. Firstly, that someone abusing others > (for example) shall be held responsible. Secondly, that in order to > hold someone responsible, he/she/... must be identifiable. The mailing list has a Usenet gateway Those users use the Usenet to post. Check the Injection-Info header for the address of the news server operator. He can identify the account that posted it. -- kind regards Marco Send spam to 1718440236mu...@cartoonies.org -- https://mail.python.org/mailman/listinfo/python-list
Re: Suggested python feature: allowing except in context maneger
On 2024-06-13 23:49, Cameron Simpson via Python-list wrote: On 13Jun2024 19:44, dieter.mau...@online.de wrote: Why not use: ``` try: with open()... ... except FileNotFoundError: ... ``` This is exactly what the OP was expressing dissatisfaction with. I'm -1 on the idea myself - not every combination of things needs additional syntactic support, and doing stuff like merging an `except` with a `wtih` is bound to introduce some weird corner case, complicating its semantics. I agree. If python allowed statement lambdas you could write what you want above within the language (albeit a bit clumsily). It's very handy. jan Cheers, Cameron Simpson -- https://mail.python.org/mailman/listinfo/python-list