Re: [Pythonmac-SIG] OS X compatibility of Appscript

2010-11-20 Thread Erik van Blokland

On Nov 19, 2010, at 11:47 PM, Mark Johannessen wrote:

 I think I've tracked down this error to the use of a python Appscript call:
 
 The process has forked and you cannot use this CoreFoundation
 functionality safely. You MUST exec().
 Break on 
 __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__()
 to debug.


This sounds similar to
http://mail.python.org/pipermail/pythonmac-sig/2010-October/022705.html
OSX 10.6 is  a lot stricter than earlier versions about loading OSX API modules 
before a process is forked. Postponing the imports until after forking is the 
solution. 

The 0.6 C11 version of setuptools triggers this exception by loading Carbon on 
its own. I believe this might have been fixed. 

A way to find who loads what is to look at sys.modules.keys() at various stages 
in the program. 

Erik
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


[Pythonmac-SIG] OS X compatibility of Appscript

2010-11-19 Thread Mark Johannessen
I think I've tracked down this error to the use of a python Appscript call:

The process has forked and you cannot use this CoreFoundation
functionality safely. You MUST exec().
Break on 
__THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__()
to debug.

This is on a machine that has:

Python 2.6.6 (MacPorts installed)
OS X 10.5.8
PPC
Appscript 0.21.1 (easy_install-2.6)
Django 1.2.3 (using easy_install)

Other than pages using Appscript, everything works fine.

Am I using the right Appscript?

Mark J
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG