Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #54394
| Path | csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <random832@fastmail.us> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.029 |
| X-Spam-Evidence | '*H*': 0.94; '*S*': 0.00; 'received:internal': 0.09; 'subject:characters': 0.09; 'suggest': 0.14; 'message- id:@webmail.messagingengine.com': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:10.202.2.212': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:66.111.4.27': 0.16; 'received:messagingengine.com': 0.16; 'received:out3-smtp.messagingengine.com': 0.16; 'subject: \n ': 0.16; 'subject:windows': 0.16; 'wrote:': 0.18; '(but': 0.19; 'bytes': 0.24; 'header:In-Reply-To:1': 0.27; 'to:2**1': 0.27; 'testing': 0.29; 'to:no real name:2**1': 0.29; '13,': 0.31; 'sep': 0.31; 'fri,': 0.33; 'subject:from': 0.34; 'received:66': 0.35; 'subject:with': 0.35; 'received:10': 0.37; 'clear': 0.37; 'confirmed': 0.38; 'e.g.': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'remove': 0.60; 'from:no real name:2**0': 0.61; 'first': 0.61; 'header:Message-Id:1': 0.63; 'to:addr:gmail.com': 0.65; 'behavior': 0.77; 'excel,': 0.84; 'pasting': 0.84; '2013,': 0.91 |
| DKIM-Signature | v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.us; h= message-id:from:to:mime-version:content-transfer-encoding :content-type:subject:date:in-reply-to:references; s=mesmtp; bh= BhCi5dwesW7/o7kbbH7RJRrgKos=; b=Pm4V1+26NDkQR1KoG495TGvWeDgVcOWp HkZCD8W1FwtoS29rcfGL/W9nwKl8leDXP6IHQ332myT9QXLm1VNuXTxmfrAjEsbu vWu7jOetNEk8en2TX+qiUNSs2ONLKlsLffNn5o1aGwAF6lpR/4e4ZlPX4jRthuk2 cFOYYxakEKI= |
| DKIM-Signature | v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:from:to:mime-version :content-transfer-encoding:content-type:subject:date:in-reply-to :references; s=smtpout; bh=BhCi5dwesW7/o7kbbH7RJRrgKos=; b=tzHGi Z6xm6ywwUhTZ9WygjXudMptaDAlhxWI9OKopnPrE/S2QeQFNoO86ApgHkiO29MAY Gw5Ll92/yFJnqFwEoKVehUUkolw7Riu+kFFeio/9QOcggjqlwwQ+GLfd5xUHHWPi S0CE4QlY2vjanH0+i/xy8IPJbBWFTW35P10pK4= |
| X-Sasl-Enc | lmcYh0OKWROYHRHYFj6JQKZ1uSglfl3xYtFIqHUKdHFx 1379531978 |
| From | random832@fastmail.us |
| To | stephen.boulet@gmail.com, python-list@python.org |
| MIME-Version | 1.0 |
| Content-Transfer-Encoding | 7bit |
| Content-Type | text/plain |
| X-Mailer | MessagingEngine.com Webmail Interface - ajax-d310b333 |
| Subject | Re: Stripping characters from windows clipboard with win32clipboard from excel |
| Date | Wed, 18 Sep 2013 15:19:38 -0400 |
| In-Reply-To | <1379088569.32542.21628745.0F1856DA@webmail.messagingengine.com> |
| References | <13c19665-6dc9-49fe-88c8-52c643892eba@googlegroups.com> <74479771-2726-4a34-8fd6-531d64c5b7a5@googlegroups.com> <3PKdndBR7KeRF6_PnZ2dnUVZ_u6dnZ2d@westnet.com.au> <f95bd3be-17ed-4bb6-9a45-b8fcc31fb1a7@googlegroups.com> <12ce40fd-bb6e-4249-a38d-7521c27a2825@googlegroups.com> <1379088569.32542.21628745.0F1856DA@webmail.messagingengine.com> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| 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 | <http://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> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.130.1379531986.18130.python-list@python.org> (permalink) |
| Lines | 11 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1379531986 news.xs4all.nl 15930 [2001:888:2000:d::a6]:47009 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:54394 |
Show key headers only | View raw
On Fri, Sep 13, 2013, at 12:09, random832@fastmail.us wrote:
> Anyway, to match behavior found in other applications when pasting from
> the clipboard, I would suggest using:
>
> if s.contains('\0'): s = s[:s.index('\0')]
>
> Which will also remove non-null bytes after the first null (but if the
> clipboard contains these, it won't be pasted into e.g. notepad).
I did some testing and confirmed you MUST do this - if you copy multiple
things from Excel, it may reuse this buffer and not clear the end of it.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Stripping characters from windows clipboard with win32clipboard from excel stephen.boulet@gmail.com - 2013-09-12 16:01 -0700
Re: Stripping characters from windows clipboard with win32clipboard from excel Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-09-13 00:19 +0000
Re: Stripping characters from windows clipboard with win32clipboard from excel stephen.boulet@gmail.com - 2013-09-12 17:58 -0700
Re: Stripping characters from windows clipboard with win32clipboard from excel MRAB <python@mrabarnett.plus.com> - 2013-09-13 02:56 +0100
Re: Stripping characters from windows clipboard with win32clipboard from excel Neil Hodgson <nhodgson@iinet.net.au> - 2013-09-13 13:43 +1000
Re: Stripping characters from windows clipboard with win32clipboard from excel stephen.boulet@gmail.com - 2013-09-13 07:31 -0700
Re: Stripping characters from windows clipboard with win32clipboard from excel Neil Cerutti <neilc@norwich.edu> - 2013-09-13 14:37 +0000
Re: Stripping characters from windows clipboard with win32clipboard from excel stephen.boulet@gmail.com - 2013-09-13 07:38 -0700
Re: Stripping characters from windows clipboard with win32clipboard from excel random832@fastmail.us - 2013-09-13 12:09 -0400
Re: Stripping characters from windows clipboard with win32clipboard from excel random832@fastmail.us - 2013-09-18 15:19 -0400
Re: Stripping characters from windows clipboard with win32clipboard from excel stephen.boulet@gmail.com - 2013-09-17 09:00 -0700
Re: Stripping characters from windows clipboard with win32clipboard from excel stephen.boulet@gmail.com - 2013-09-18 12:28 -0700
Re: Stripping characters from windows clipboard with win32clipboard from excel MRAB <python@mrabarnett.plus.com> - 2013-09-18 20:40 +0100
Re: Stripping characters from windows clipboard with win32clipboard from excel Dave Angel <davea@davea.name> - 2013-09-18 20:13 +0000
Re: Stripping characters from windows clipboard with win32clipboard from excel Neil Hodgson <nhodgson@iinet.net.au> - 2013-09-19 07:40 +1000
Re: Stripping characters from windows clipboard with win32clipboard from excel Dave Angel <davea@davea.name> - 2013-09-18 23:51 +0000
Re: Stripping characters from windows clipboard with win32clipboard from excel Neil Cerutti <neilc@norwich.edu> - 2013-09-19 15:53 +0000
Re: Stripping characters from windows clipboard with win32clipboard from excel Dave Angel <davea@davea.name> - 2013-09-19 19:58 +0000
Re: Stripping characters from windows clipboard with win32clipboard from excel random832@fastmail.us - 2013-09-19 10:39 -0400
csiph-web