This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Carbon.Scrap.PutScrapFlavor
Type: behavior Stage: test needed
Components: macOS Versions: Python 2.7, Python 2.6
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: jackjansen Nosy List: dingus9, jackjansen, ngie, ronaldoussoren
Priority: low Keywords:

Created on 2007-04-14 08:27 by dingus9, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (5)
msg31786 - (view) Author: dingus9 (dingus9) Date: 2007-04-14 08:27
The GetScrapFlavor(), and ClearCurrentScrap() functions work fine, however the PutScrapFlavor, is not putting th e text into my clipboard. The function does not return an error nor exception from my code, as far as I can tell.

sample of code:
import Carbon.Scrap as scrap 
import MacOS

    text = 'the test text'
    scrap.ClearCurrentScrap()
    item = scrap.GetCurrentScrap()
    item.PutScrapFlavor(type, 0, text)

Result is: Previous text is cleard, and nothing is put in its place.

I am continuing to research this, as well as try it in C, and install python2.5.

Environment
Python 2.4
Mac OSX 10.4.9
Intel
msg31787 - (view) Author: dingus9 (dingus9) Date: 2007-04-15 09:41
Tested with python25, function calls GetScrapFlavorData, and PutScrapFlavorData now result in a bus error.
msg83602 - (view) Author: Enji Cooper (ngie) * Date: 2009-03-14 21:02
I'm confirming this issue on Intel / Leopard with python 2.5 (system
python), 2.5 (macports) and 2.6 (macports).

PPC / Tiger with python 2.3 (system python), 2.5 (macports) and 2.6
(macports) just errors out with:

MacOS.Error: (-4960, 'coreFoundationUnknownErr')
msg83603 - (view) Author: Enji Cooper (ngie) * Date: 2009-03-14 21:05
The failure testcase that dingus9 provided is:

import Carbon.Scrap as Scrap
scrap = Scrap.GetCurrentScrap()
scrap.GetScrapFlavorData('TEXT')
msg95688 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2009-11-24 17:02
Lowering the priority to low because this is a bug in a deprecated binding 
for a deprecated Apple framework.  I won't work on a fix, although I am 
willing to review and apply a patch when someone provides one.
History
Date User Action Args
2022-04-11 14:56:23adminsetgithub: 44847
2009-12-26 11:21:10ronaldoussorensetstatus: open -> closed
2009-11-24 17:02:12ronaldoussorensetpriority: normal -> low
versions: + Python 2.7, - Python 2.5
nosy: + ronaldoussoren

messages: + msg95688

resolution: wont fix
2009-03-14 21:06:02ngiesetversions: - Python 2.4
2009-03-14 21:05:48ngiesetversions: + Python 2.5, Python 2.4
2009-03-14 21:05:39ngiesetmessages: + msg83603
2009-03-14 21:02:13ngiesetnosy: + ngie
messages: + msg83602
2009-02-15 19:42:32ajaksu2setstage: test needed
type: behavior
versions: + Python 2.6
2007-04-14 08:27:02dingus9create