Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Pohl's law: Nothing is so good that somebody, somewhere, will not hate it.


devel / comp.lang.python / Re: Writing to clipboard in Python 3.11

SubjectAuthor
o Re: Writing to clipboard in Python 3.11MRAB

1
Re: Writing to clipboard in Python 3.11

<mailman.190.1699376682.3828.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=24399&group=comp.lang.python#24399

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder2.eternal-september.org!eternal-september.org!fu-berlin.de!uni-berlin.de!not-for-mail
From: pyt...@mrabarnett.plus.com (MRAB)
Newsgroups: comp.lang.python
Subject: Re: Writing to clipboard in Python 3.11
Date: Tue, 7 Nov 2023 17:01:33 +0000
Lines: 33
Message-ID: <mailman.190.1699376682.3828.python-list@python.org>
References: <71d3e1c6-6efa-4f78-aef5-de3997e244f7@btinternet.com>
<e468803f-0ddb-491b-a17f-cf7cec046cc8@mrabarnett.plus.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de rrO48O3JIyup5wwQA6RseA9l9+odYTCmUxd5ORwaLzyA==
Cancel-Lock: sha1:q3ngiYCv3YOLOmn7GGQOUQtKbwA= sha256:GPimW4fiNqlWu1NX78el2SDXL6HcNuimYQqP9DUdErU=
Return-Path: <python@mrabarnett.plus.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=plus.com header.i=@plus.com header.b=hsE+Vobd;
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.001
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'traceback': 0.04; '(most':
0.05; 'last):': 0.05; 'from:addr:python': 0.09; 'output:': 0.09;
'received:192.168.1.64': 0.09; 'subject:Python': 0.12; 'import':
0.15; 'from:addr:mrabarnett.plus.com': 0.16; 'from:name:mrab':
0.16; 'instead.': 0.16; 'message-id:@mrabarnett.plus.com': 0.16;
'program:': 0.16; 'received:84.93': 0.16; 'received:84.93.230':
0.16; 'received:plus.net': 0.16; 'wrote:': 0.16; 'problem': 0.16;
'python': 0.16; 'round': 0.19; 'to:addr:python-list': 0.20;
'anyone': 0.25; 'recently': 0.29; 'this?': 0.29; 'error': 0.29;
'header:User-Agent:1': 0.30; 'program': 0.31; 'python-list': 0.32;
'received:192.168.1': 0.32; 'but': 0.32; 'there': 0.33; 'same':
0.34; 'header:In-Reply-To:1': 0.34; "skip:' 10": 0.37; 'using':
0.37; 'received:192.168': 0.37; 'file': 0.38; 'text': 0.39; 'use':
0.39; 'sample': 0.61; 'skip:o 10': 0.61; 'shed': 0.69; 'happens':
0.84; 'rob': 0.84; 'consists': 0.93
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plus.com; s=042019;
t=1699376494; bh=OuHEQyMlygxX6IZCjKfhAF4w9mkvFQJXBD5x3w6pzXE=;
h=Date:Subject:To:References:From:In-Reply-To;
b=hsE+VobdMt9rJbLQ2wUewm36SE//Lcma5paHEgCJ/iCTIVdbMe9MiGTD954VV/HjV
H5fzHFASQwlOGiDOt795hv1eDwzl9g4gNvRy/eP1itjhvG1Msk8qytGqA8Eo+z6aRS
v99YvGJM/XaY/mJqwJWQmzLZWe9PO8Yn/EAgShoJp4vEEbbA2dqhYJLx7Z/AaBeQzQ
gLgvcq7ASvOXVfrQbbc4gqQopQiFQU4QbYL4g5wUcPZ811m730wxcJPTtUfb8+veu6
HMqbu4io+OKUf4HXhzaZ0tpVbtZ5OmcOnjY+kFhy0MqhDNujGAG9lbpEC3bxmbkNH/
wAfogeIZ6M4AQ==
X-Clacks-Overhead: "GNU Terry Pratchett"
X-CM-Score: 0.00
X-CNFS-Analysis: v=2.4 cv=UtZwis8B c=1 sm=1 tr=0 ts=654a6d6e
a=0nF1XD0wxitMEM03M9B4ZQ==:117 a=0nF1XD0wxitMEM03M9B4ZQ==:17
a=IkcTkHD0fZMA:10 a=hOwQjUVM8FFxqvBL_F0A:9 a=QEXdDO2ut3YA:10
X-AUTH: mrabarnett@:2500
User-Agent: Mozilla Thunderbird
Content-Language: en-GB
In-Reply-To: <71d3e1c6-6efa-4f78-aef5-de3997e244f7@btinternet.com>
X-CMAE-Envelope: MS4xfPK0VVMgLpl/nU0ZViQ5gM7/uG9xBxPjn2vGJd0k+4PKOmG9PicsQUSXv1d9rojpCuLQv7Be1ylMXI4ZU240XysEkmUDbBGdlJOdqxDqm+2kvfHoOeTh
ARwuKP2U/7TynMIilmx4vu1iLtJ93xfGfd8eNyfYYHLxDp/emYt9aRruxVnyszjRbDszfyTZ8dkcQjTubs/mJEUxSv9GrDcNxl4=
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <e468803f-0ddb-491b-a17f-cf7cec046cc8@mrabarnett.plus.com>
X-Mailman-Original-References: <71d3e1c6-6efa-4f78-aef5-de3997e244f7@btinternet.com>
 by: MRAB - Tue, 7 Nov 2023 17:01 UTC

On 2023-11-06 00:51, Rob Cliffe via Python-list wrote:
> Recently I switched from Python 3.8.3 to Python 3.11.4.  A strange
> problem appeared which was not there before:
> 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.
> 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 "R:\W.PY", line 8, in <module>
>     SetClipboardData(CF_UNICODETEXT, "0")
> pywintypes.error: (0, 'SetClipboardData', 'No error message is available')
>
> I can get round the problem by using SetClipboardText().  But can anyone
> shed light on this?

It also happens in Python 3.10, but not Python 3.9.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor