[Pythonmac-SIG] Using a unix Python with a MacPython Lib tree

Jack Jansen jack@oratrix.nl
Tue, 03 Apr 2001 16:26:22 +0200


> > Has anyone tried (on OSX) using a Unix Python with a MacPython Lib tree? 
>
> Some import fail silently (probably there's a comment char that kills
> the whole "line" (that is, the whole file) and others give a syntax
> error. 

Have you tried it on a UFS filesystem or on a HFS+ filesystem? I was hoping 
that on HFS+ MacOSX would be smart enough to do CR->LF translation for files 
with filetype TEXT. But, if you tried this on HFS+ then apparently we have no 
such luck:-(

For MacPython I could hack the low-level stdio routine that does CR->LF 
conversion, which would treat both CR and LF as line-end. Note that this is 
different from trying to fix it in MacPython itself, which I've always been 
reluctant to do because of various side-effects. On output \n would be 
translated to \r, as happens now, on input both \r and \n would be mapped to 
\n.

If the same could be done for BSD-Python The any text file should be readable 
as text from both runtimemodels.
--
Jack Jansen             | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
www.oratrix.nl/~jack    | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm