[Pythonmac-SIG] These are un-doable, right?

Jack Jansen jack@oratrix.nl
Mon, 15 May 2000 10:42:57 +0200


> First of all, am I correct in my understanding that I can not create a
> child process (fork), or a separate thread, or any other kind of
> multi-tasking with the mac version of Python? I think that this is only
> available with Windows or UNIX systems. This is what I understand but I
> don't know for sure.

Fork is indeed unavailable on Mac, but as of 1.6a2 threads do work. They 
haven't been tested thoroughly, though, so please give them a try.

To start up separate processes you could look at the findertools module, or 
you could use the OSA (AppleScript) modules. Python:Mac:Demo:applescript.html 
has an example of the latter.

> Assuming that is the case, I am also curious about whether or not it will
> be possible to do this with Python under OS X.

Definitely. But don't hold your breath for it: it's currently possible to 
build a standard Unix Python for MacOSX (the standard Unix distribution almost 
compiles out of the box) and I'm slowly working on Carbon compliance for 
MacPython, but when and how these two will meet is uncertain.

> Another thing-- Am I correct in thinking that I can't do anything with the
> (toolbox ) Time Manager?

There isn't an interface to time mgr currently. Definitely doable with a day 
of work, but I don't have the time to spend on it. If someone else wants to 
take this up I'll gladly give some advise, though.

> Lastly --  Is there any way to call AppleScripts from within Python?

Often you don't have to call AppleScripts, because all of OSA is available 
from MacPython. But if you do need this specific functionality look at 
Python:Mac:Contrib:osam, this does what you want.
--
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