[Pythonmac-SIG] Mac{ho}Python architecture ready for review

Ronald Oussoren oussoren@cistron.nl
Fri, 2 Aug 2002 22:21:48 +0200


On Friday, August 2, 2002, at 10:11 , Jack Jansen wrote:

>
> On vrijdag, augustus 2, 2002, at 09:47 , Ronald Oussoren wrote:
>
>> Let me join the 'me too' parade...
>>>     import waste
>>> ImportError: No module named waste
>
> Ah, that's the culprit! The IDE needs the waste module. The waste 
> module will be built by the toplevel make, but only if it can find the 
> waste library. You have to get the waste distribution (from 
> www.merzwaren.com), and make sure it's reachable as one of "../waste", 
> "../../waste", etc. It's probably best to put a symlink "waste" beside 
> the Python distribution that points to the right location.

I'll try that. Thanks.

>
> I'll add a better error message to the IDE, and some building notes to 
> the README.
>
>> BTW. I only got this for after I did 'chmod g+w' on the 
>> Python.framework (my Python.framework  is owned by root:admin), this 
>> may be the indication of another problem: Apperently normal users need 
>> write access to the python installation. IMHO this is something that 
>> should be avoided.
>
> Hmm, my Python.framework is owned by jack.admin. Two questions arise:
> - How come yours is owned by root? did you do a "sudo make install"? I 
> think I suggested that at some point in the past, but I've since then 
> come to the conclusion that this isn't a good idea. So if there's 
> anywhere where this is still suggested I'd like to know where.
> - Even if the framework is owned by root I don't understand why this 
> should be a problem... Where did things fail?

The problem was that the framework was not writeable by me. In general I 
try to avoid having files that are writeable by me outside of my 
home-directory. It is a bit inconvenient, but helps me from accidently 
trashing my system. But, even if *I* have write-access to system 
directories, I don't want other users to also have write-access to those 
directories (not that I normally share my machine with other users, but 
this is an issue for centrally managed systems)

It fails like this:
IOError: [Errno 13] Permission denied: 
'/Library/Frameworks/Python.framework/Versions/2.3/Mac/Tools/IDE/Widgets.rsrc.
df.rsrc'
Traceback (most recent call last):
   File "./Mac/Tools/IDE/PythonIDE.py", line 35, in ?
   File "./Mac/Tools/IDE/PythonIDE.py", line 23, in init
   File 
"/Library/Frameworks/Python.framework/Versions/2.3/Mac/Lib/macresource.py"
, line 64, in need
     refno = open_pathname(pathname)
   File 
"/Library/Frameworks/Python.framework/Versions/2.3/Mac/Lib/macresource.py"
, line 92, in open_pathname
     pathname = _decode(pathname)
   File 
"/Library/Frameworks/Python.framework/Versions/2.3/Mac/Lib/macresource.py"
, line 104, in _decode
     applesingle.decode(pathname, newpathname, resonly=1)
   File 
"/Library/Frameworks/Python.framework/Versions/2.3/Mac/Lib/applesingle.py"
, line 74, in decode
     fp = open(output, 'wb')
IOError: [Errno 13] Permission denied: 
'/Library/Frameworks/Python.framework/Versions/2.3/Mac/Tools/IDE/Widgets.rsrc.
df.rsrc'
Traceback (most recent call last):
   File "./Mac/Tools/IDE/PythonIDE.py", line 35, in ?
   File "./Mac/Tools/IDE/PythonIDE.py", line 23, in init
   File 
"/Library/Frameworks/Python.framework/Versions/2.3/Mac/Lib/macresource.py"
, line 64, in need
     refno = open_pathname(pathname)
   File 
"/Library/Frameworks/Python.framework/Versions/2.3/Mac/Lib/macresource.py"
, line 92, in open_pathname
     pathname = _decode(pathname)
   File 
"/Library/Frameworks/Python.framework/Versions/2.3/Mac/Lib/macresource.py"
, line 104, in _decode
     applesingle.decode(pathname, newpathname, resonly=1)
   File 
"/Library/Frameworks/Python.framework/Versions/2.3/Mac/Lib/applesingle.py"
, line 74, in decode
     fp = open(output, 'wb')


Ronald