Hi,

I have installed python24 both under Panther and Tiger, and ran into fatal errors with Python's Carbon package, in particular the Module "Scrap" it contains (so the name seems to be well-chosen for this module).

To show what happens, I typed a couple of lines in the interactive shell. The objective is to import the Scrap module and use it to add a PDF document to the Mac's Clipboard. This works fine in python2.3 under Panther.

(1)
The error-free case - on Panther with python23 from fink:

% fink --version
Package manager version: 0.24.7
Distribution version: 0.7.2.rsync

% python2.3
Python 2.3.5 (#1, Apr 29 2005, 19:27:12)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from Carbon import Scrap
>>> f=open("file.pdf")
>>> contents=f.read()
>>> f.close()
>>> Scrap.ClearCurrentScrap()
>>> Scrap.GetCurrentScrap().PutScrapFlavor('PDF ',0,contents)
>>>

This worked without problems.

(2)
Now the SAME  with python 2.4 from fink on Panther:

% python
Python 2.4.1 (#1, Apr 29 2005, 17:22:41)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from Carbon import Scrap
>>> f=open("file.pdf")
>>> contents=f.read()
>>> f.close()
>>> Scrap.ClearCurrentScrap()
>>> Scrap.GetCurrentScrap().PutScrapFlavor('PDF ',0,contents)
Bus error

(3)
Now the SAME with python24 from fink on TIGER (this produces a DIFFERENT error!):
% python
Python 2.4.1 (#1, May  9 2005, 16:41:26)
[GCC 4.0.0 20041026 (Apple Computer, Inc. build 4061)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from Carbon import Scrap
>>> f=open("file.pdf")
>>> contents=f.read()
>>> f.close()
>>> Scrap.ClearCurrentScrap()
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
MacOS.Error: (-4960, 'coreFoundationUnknownErr')

Here is some info about my fink installation under Tiger :
% fink --version
Package manager version: 0.24.7
Distribution version: 0.8.0.rsync

% fink list -i python24
Information about 4761 packages read in 4 seconds.
i python24 1:2.4.1-1 Interpreted, object-oriented language i python24-shlibs 1:2.4.1-1 Interpreted, object-oriented language
 i   python24-socket    1:2.4.1-1     Socket plugin for python

% fink list -i py24
Information about 4761 packages read in 2 seconds.
i ipython-py24 0.6.12-1 Replacement interactive Python interpreter i numeric-py24 23.8-11 Multidim'l numerical arrays for Python, using Ap...
 i   pil-py24           1.1.4-27      Python Imaging Library
 i   pyxml-py24         0.8.4-1       XML Parsers and API for Python
 i   reportlab-py24     1.20-11       PDF creation library for Python
i scientificpyth... 2.4.9-2 Python modules useful for scientific computing

The Tiger system shows the same error using python2.3. I have to add that /usr/bin/python on my Tiger machine also gets stuck in the same way, but has no problems on Panther. The upshot is that the following pythons seem to misbehave with Carbon.Scrap: fink's python24 on Panther, and all pythons on Tiger. If anyone knows what could be causing this, I'd greatly appreciate any info.

Jens




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Fink-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-users

Reply via email to