[Pythonmac-SIG] For your eyes only: new 2.3rc1+ installer

Alexandre Parenteau aparente at adobe.com
Wed Jul 23 10:07:45 EDT 2003


Jack,

I don't know the severity, but just in case, here is an annoying issue I 
run into yesterday : the different behavior of FSSpec for 2.2 CFM and 2.3 
Mach-O.

One could argue that FSSpec is not necessary anymore, but it is still very 
much alive as soon as you talk AppleEvents: think 
CodeWarrior.make(projectfss, xmfss) for example.

In 2.2 CFM, when you create a FSSpec from a path, the last component 
doesn't have to exist in order for FSSpec to return a valid spec. My Root 
disk is named "MacOSX", and you'll notice I can create without any problem 
FSSpec("MacOSX:dummy") even though "dummy" doesn't exist.

Python 2.2.2 (#138, Oct 25 2002, 23:10:42)  [CW CARBON GUSI2 THREADS GC] on mac
Type "copyright", "credits" or "license" for more information.
 >>> import macfs
 >>> macfs.FSSpec("MacOSX")
FSSpec((-100, 2664524, 'MacOSX'))
 >>> macfs.FSSpec("MacOSX:dummy")
FSSpec((-100, 2, 'dummy'))
 >>> macfs.FSSpec("MacOSX:dummy:")
FSSpec((-100, 2, 'dummy'))
 >>> macfs.FSSpec("MacOSX:dummy:dummy2")
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
MacOS.Error: (-120, 'Directory not found')
 >>>

Now this is all different with 2.3. I have no practical way to create a 
FSSpec pointing on a file that doesn't exist yet:

[GCC 3.1 20020420 (prerelease)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
 >>> import Carbon.File
 >>> Carbon.File.FSSpec("/")
Carbon.File.FSSpec((-100, 1, 'MacOSX'))
 >>> Carbon.File.FSSpec("/dummy")
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
MacOS.Error: (-43, 'File not found')
 >>>

Am I making myself clear ? Am I missing something obvious ?

Looking at the code I believe it might be a subtle Carbon difference of 
MakeFSSpec when involked from CFM or Mach-O, or may be not. I remember the 
GUSI code (GUSIFileSpec.cpp) gets into all sort of troubles in order to 
unfold manually these components, resolving aliases at the same time... Did 
the 2.2 code by any chance used GUSIFileSpec ? (I would not know, I don't 
have the 2.2 source code anymore).

Sorry if it is all obscure. For now I'm living by creating an empty file 
and then removing it after the FSSpec is computed.

Regards,
alex.

At 12:46 PM 7/23/2003 +0200, Jack Jansen wrote:

>On Wednesday, Jul 23, 2003, at 10:58 Europe/Amsterdam, Jack Jansen
>wrote:
>>I've found the culprit (the binary inside Python.app has been renamed
>>from "python" to "Python" to adhere to Apple's guidelines), I'm fixing
>>and testing it right now, I'll do a new rc1+ installer later today.
>
>A new installer is available as
><http://ftp.cwi.nl/jack/python/mac/newer/MacPython-OSX-2.3rc1plus- 8.dmg>. 
>It has the pythonw bug fixed, and in addition I've taken out
>the "root disk only" option, replacing it with a warning in the README
>that you should only install on your active system disk. The
>root-disk-only option was causing too many problems.
>
>There's still the problem (also noted here) that the welcome message
>doesn't have a scrollbar. I have no idea how to fix this, so comments
>are welcome. And if someone still has any ideas on how to fix the
>root-disk-only option: the old -6 installer is still available to play
>with, let me know about any bright ideas.
>--
>Jack Jansen, <Jack.Jansen at cwi.nl>, http://www.cwi.nl/~jack
>If I can't dance I don't want to be part of your revolution -- Emma
>Goldman
>
>
>_______________________________________________
>Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
>http://mail.python.org/mailman/listinfo/pythonmac-sig




More information about the Pythonmac-SIG mailing list