[XML-SIG] Mac Python (CFM68K) won't import pyexpat

Bruce Bennett bbennett@unixg.ubc.ca
Sat, 12 Dec 1998 14:40:28 -0800


Greetings, xml-sig folk --

When I try to import pyexpat (as at the beginning of pyexpattest.py), I see
a curious error message:

	Python 1.5.1 (#37, Apr 27 1998, 13:36:17)  [CW CFM68K w/GUSI w/MSL]
	Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
	>>> import sys
	>>> import pyexpat
	Traceback (innermost last):
	  File "<stdin>", line 1, in ?
	ImportError: PythonCore--PySys_WriteStderr:
	  A fragment had "hard" unresolved imports.

Having no clue what this errmsg really means, I then try to import
'Pyexpat', hoping to confirm that Python is seeing the pyexpat lib file:

	>>> import Pyexpat
	Traceback (innermost last):
	  File "<stdin>", line 1, in ?
	NameError: Case mismatch for module name Pyexpat
	(filename pyexpat.cfm68k.slb)

So yes, it's seeing it.

Is there a problem with pyexpat.cfm68k.slb? Or with something I'm (not)
doing? Does importing pyexpat require the definition of paths to other
dependencies in the xml-0.5 package?

I'm running System 7.5.5 with CFM-68K Runtime Enabler v. 4.0, and
encountering no other problems with Mac Python 1.5.1.

--

BTW, in the recently-released xml-0.5 package for Python, the file
README.pyexpat says the requisite Macintosh binaries are available as

>   ftp://ftp.cwi.nl/pub/jack/python/pyexpat.hqx (macintosh binary-only).
                                     ^^^^^^^^^^^
At present, however, the filename in fact seems to be 'pyexpat.sit.hqx'.
Further (in case the preceding observation wasn't petty enough), conformity
with other Mac Python shared libs suggests the orthography
'pyexpat.CFM68k.slb' instead of the current 'pyexpat.cfm68k.slb'.

Regards,

-- Bruce Bennett <bbennett@unixg.ubc.ca>