[Pythonmac-SIG] py2app & multiprocessing

Alexandre Quessy alexandre at quessy.net
Sat Aug 15 15:16:01 CEST 2009

Hi everyone,
I use Twisted everyday, and have worked on a wx GUI for an application
using it. We also use Py2App to bundle it up. It works flawlessly. I
use the Twisted main loop, which controls the wx events loop.

To make both of them work together, you need to do the following :

from twisted.internet import wxreactor

You can check our RawMaterials application since it is free software.
It has a lot of dependencies, so it is rather difficult to build.
We use a shell script to build and copy things in the .app :

I would say the problem is probably more about multiprocessing than wx
and twisted. Using subprocess, or pexpect, or commands might be a
better idea.


2009/8/14 Gabriel Rossetti <gabriel.rossetti at arimaz.com>:
> Christopher Barker wrote:
>> Gabriel Rossetti wrote:
>>> no SSH, nothing) and I have to had reboot it. It uses a combination of
>>> Twisted and wxPython and is rather large, so I don't know where this comes
>>> from, it could be wx, twisted or the two together.
>> It's probably not wx -- it is used a fair bit on Macs.
>> I don't know how much Twisted is used on the Mac. It might be worth asking
>> on a Twisted list. Also, have you tried just a simple Twisted app on its
>> own?
>> And yes, I suppose the two together could be an issue.
> Yes actually, it was the two together. I used something someone had told me
> about a some time ago, that is to use the wx eventloop as the main eventloop
> and have twisted's run in a separate thread, it now works fine on Mac.
> I'm still working on the pz2app part though, I'll kep everyone updated.
> Gabriel
>> Oh, and do you have these problems running without py2app?
>>> Popen could not find my files when using py2app,
>> This should be a simple path issue -- a few judicious print statements
>> should help here.
>> > even though they were in the same
>>> directory as the main exec. I even tried putting the execs in the
>>> resource dir but no luck,
>> hmm -- I think that is indeed where the working dir is set by py2app when
>> starting op. try:
>> print os.getcwd()
>> you can look in the "Console" app to see stuff printed to stdout.
>> -Chris
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig

Alexandre Quessy

More information about the Pythonmac-SIG mailing list