[Pythonmac-SIG] Building a MacPython-OSX on top of Jaguar's /usr/bin/python

Just van Rossum just@letterror.com
Fri, 22 Nov 2002 11:52:53 +0100


Jack Jansen wrote:

> An alternative is to do away with FSSpecs completely, and switch to 
> FSRefs everywhere, but this would require first implementing enough 
> support for FSRefs, and then fixing all the Python code (especially 
> FSSpecs pointing to non-existing files will be a problem).

I've quickly scanned the IDE's usage of FSSpecs:

  for [G|S]etCreatorType   5 occurances (perhaps MacOS.[G|S]etCreatorType()
                             can be used instead?)
  after FindFolder         1 in MacPrefs.py
  for NewAlias             1 (to store an alias in to scripts folder)

And then I found this line in PyEdit.py that I don't understand:

  file_path = macfs.FSRef(macfs.FSSpec(self.path)).as_pathname()


Building with Makefile.jaguar went fine, although it did complain at the end
that it couldn't install /usr/bin/pythonw (permission denied), although
README.JAGUAR suggests it won't install pythonw.

My rewritten Mac/scripts/buildappbundle.py didn't fail, but I'm not sure what
the installed python-additions/Python.app is supposed to do. Double-clicking it
fails (prints an error to Console.app, see below), and that could be caused by
my code. What is it supposed to do?

Here's the error:
"""Unknown option: -p
usage:
/Applications/MacPython-OSX/python-additions/Python.app/Contents/MacOS/Python
[option] ... [-c cmd | file | -] [arg] ...
Try `python -h' for more information.
"""

That is surely that funny -p<processnumber> argument.

Just