[wxPython] Is wxTheClipboard.SetData(data) doing an rtrim?

It appears that wxTheClipboard.SetData(data) is rtrim()'ng data behind the
scenes? Is that true? If so, it doesn't seem right to me. If I cut or copy
text to the clipboard, and that text has trailing whitespace, I expect the
trailing whitespace to be there when I paste the text into some other app.

Here is my code, in case I'm doing something wrong:

        if self.CanCopy():
            command = self.GetSelectedText()
            data = wxTextDataObject(command)
            if wxTheClipboard.Open():
                wxTheClipboard.SetData(data)
                wxTheClipboard.Close()

Now that I look at the code, I see that wxTextDataObject() may also be the
culprit.

···

---
Patrick K. O'Brien
Orbtech
"I am, therefore I think."

It appears that wxTheClipboard.SetData(data) is rtrim()'ng data behind the
scenes? Is that true?

Works okay for me:

Welcome To PyCrust 0.7 - The Flakiest Python Shell
Python 2.1.1 (#20, Aug 27 2001, 20:21:36) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.

from wxPython.wx import *

def stuff(text):

... data = wxTextDataObject(text)
... if wxTheClipboard.Open():
... wxTheClipboard.SetData(data)
... wxTheClipboard.Close()
...

stuff(" SPAM ")

And in another process:

Welcome To PyCrust 0.7 - The Flakiest Python Shell
Python 2.1.1 (#20, Aug 27 2001, 20:21:36) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.

from wxPython.wx import *

def unstuff():

... if wxTheClipboard.Open():
... if wxTheClipboard.IsSupported(wxDataFormat(wxDF_TEXT)):
... data = wxTextDataObject()
... wxTheClipboard.GetData(data)
... text = data.GetText()
... wxTheClipboard.Close()
... return text
...

unstuff()

' SPAM '

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!

Me too. (Why didn't *I* think of your simple test.) But I'm still having a
problem with trailing whitespace being stripped out when I copy and paste
from PyCrust. I'll investigate further and report back. Sorry about the
false alarm.

···

---
Patrick K. O'Brien
Orbtech
"I am, therefore I think."

-----Original Message-----
From: wxpython-users-admin@lists.wxwindows.org
[mailto:wxpython-users-admin@lists.wxwindows.org]On Behalf Of Robin Dunn
Sent: Wednesday, October 24, 2001 11:51 AM
To: wxpython-users@lists.wxwindows.org
Subject: Re: [wxPython] Is wxTheClipboard.SetData(data) doing an rtrim?

It appears that wxTheClipboard.SetData(data) is rtrim()'ng data behind the
scenes? Is that true?

Works okay for me:

It appears that Microsoft Outlook does a bit of trimming when you paste into
it. Gotta love Microsoft. Again, sorry for the false alarm and for not
investigating this further myself. Not enough sleep, I guess.

···

---
Patrick K. O'Brien
Orbtech
"I am, therefore I think."

-----Original Message-----
From: wxpython-users-admin@lists.wxwindows.org
[mailto:wxpython-users-admin@lists.wxwindows.org]On Behalf Of Patrick K.
O'Brien
Sent: Wednesday, October 24, 2001 12:11 PM
To: wxpython-users@lists.wxwindows.org
Subject: RE: [wxPython] Is wxTheClipboard.SetData(data) doing an rtrim?

Me too. (Why didn't *I* think of your simple test.) But I'm still having a
problem with trailing whitespace being stripped out when I copy and paste
from PyCrust. I'll investigate further and report back. Sorry about the
false alarm.

---
Patrick K. O'Brien
Orbtech
"I am, therefore I think."