[wxPython-users] Re: Clipboard refuses
Ben Kaplan
bskaplan14 at yahoo.com
Sat Feb 2 05:40:15 PST 2008
The Debian repositories aren't exactly keeping up with the newest releases of wxPython. The version you are using is 14 releases behind (though I might have miscounted). Try updating wxPython and see if that makes a difference.
http://wiki.wxpython.org/InstallingOnUbuntuOrDebian
----- Original Message ----
From: Egbert Bouwman <egbert.bouwman at xs4all.nl>
To: wxPython-users at lists.wxwidgets.org
Sent: Saturday, February 2, 2008 6:52:44 AM
Subject: Re: [wxPython-users] Re: Clipboard refuses
Hello
Robin
et
alii,
On
Fri,
2008-02-01
at
08:35
-0800,
Robin
Dunn
wrote
about
my
question
on
a
non
responding
clipboard
after
closing
my
wxPython
experiment:
>
Not
sure,
the
Flush
appears
to
be
working
for
me.
Please
let
us
know
>
your
platform
and
version.
Debian
Testing
and
maybe
still
some
Unstable.
Linux
kernel
2.6.21-2-686
Gnome
version
2.18.3
Python
2.4.4-6
python-wxgtk2.6
2.6.3.2.2-1
>
>
BTW,
if
you're
using
a
Unicode
build
of
wxPython
then
you
should
do
this
>
in
case
the
system
locale
is
not
using
the
latin-1
encoding:
>
>
latin1
=wx.TextDataObject("sm\xf8rebr\xf8d".decode("latin-1"))
Thanks.
In
my
head
the
latin-1
and
unicode
intricacies
are
still
a
muddle.
Her
follows
my
script
again,
a
bit
reorganised,
but
still
not
working
well:
#!/usr/bin/env
python
import
wx
class
Raam(wx.Frame):
def
__init__(self,titel,pos,size):
wx.Frame.__init__(self,
None,
-1,
titel,
pos,
size)
self.knop
=
wx.Button(self,
-1,
"KNOP")
self.Bind(wx.EVT_BUTTON,
self.klipper,
self.knop)
def
klipper(self,
event):
latin1
=wx.TextDataObject("sm\xf8rebr\xf8d")
print
"Experiment
with
latin-1:
%s"
%
latin1.GetText()
if
wx.TheClipboard.Open():
wx.TheClipboard.SetData(latin1)
wx.TheClipboard.Flush()
wx.TheClipboard.Close()
def
OnQuit(self,
event):
self.Close()
class
App(wx.App):
def
OnInit(self):
self.raam
=
Raam("Experiment
with
clipboard",(20,30),
(50,40))
self.SetExitOnFrameDelete(True)
#
Default.
self.raam.Show()
self.SetTopWindow(self.raam)
return
True
app
=
App()
app.MainLoop()
e
>
--
Egbert
Bouwman
Keizersgracht
197-II
1016
DS
Amsterdam
Tel
0(031)20
6257991
---------------------------------------------------------------------
To
unsubscribe,
e-mail:
wxPython-users-unsubscribe at lists.wxwidgets.org
For
additional
commands,
e-mail:
wxPython-users-help at lists.wxwidgets.org
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/20080202/ae8f9fe8/attachment.htm
More information about the wxpython-users
mailing list