[Pythonmac-SIG] bundled & shared library with python

Bob Ippolito bob at redivi.com
Mon Jul 21 16:51:32 EDT 2003


On Monday, Jul 21, 2003, at 15:16 America/New_York, Python Development 
wrote:

> Hi,
>
> Has anyone taken an app (bundle, .nib, Localized.rsrc, ...) and invoke 
> it from another app, such that it runs not as a different process from 
> the calling program, but on a second thread in some sort of shared 
> library in a two threaded app?
>
> What I am trying to do is call a small program that handles a system 
> status bar (NSStatusBar/NSStatusItem -- like the sound status menu) 
> from within a program which is running two threads.  One thread is for 
> python & modules, while the other thread is for this system status 
> bar.  Obviously, I can get a python (& modules) and a system status 
> bar app to run as two different processes and communicate between each 
> other.  In combining these two programs on two threads in one program, 
> I hope to reduce possible problems.

Only one thread per process can have a UI runloop.  You either need to 
refactor your software so that it shares the runloop between both tasks 
(best option), or make two separate processes communicate with each 
other.

Threads typically cause more (or at least, less obvious and harder to 
find/fix) problems than separate processes, anyways.

-bob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 1320 bytes
Desc: not available
Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20030721/a55c78d9/attachment.bin


More information about the Pythonmac-SIG mailing list