Re: [Pythonmac-SIG] py2app multiprocessing

2009-08-14 Thread Gabriel Rossetti

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@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] py2app multiple executable files with a main launcher

2009-08-14 Thread Gabriel Rossetti

Christopher Barker wrote:

Gabriel Rossetti wrote:
I am trying to bundle an application I wrote usinf py2app. The 
application has a launcher launcher.py and a Python script 
main.py that calls the launcher several times in sub-processes with 
diff args.


I wanted to do something like this a while back (quite a while!). 
Check out this thread:


http://mail.python.org/pipermail/pythonmac-sig/2005-August/014928.html

In particular, this post:

http://mail.python.org/pipermail/pythonmac-sig/2005-August/014940.html

And no, I never did get that going -- we found another solution.

-Chris



Thanks Chris, are you able to tell me what solution you found?

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


[Pythonmac-SIG] Mac OS-X 10.5 and two icons bouncing in the dock problem

2009-08-14 Thread Hans-Peter Jansen
Hi,

attached PyQt script demonstrates an ugly issue, I'm desperately fighting 
with since a couple of days :-(.

Issue:
when starting the app via double click or single click on dock icon or 
dropping a plain/text file on dock or application icon, all actions lead to 
two bouncing icons. 

The one with the blue spot is the good one, that stops bouncing after 
start-up. The bad one will stop bouncing eventually, and shows Application 
not responding in its context menu then. As long as the bad one exists, 
dropping files on the good one will be ignored. After killing (and 
sometimes removing from the dock is necessary) all is well - one can drop 
files one the good one and on the app icon, all behaves well, up to the 
point of being terminated, then this ugly game starts again.

The issue is not depending on the arch, but on OS-X 10.5. It does not happen 
with 10.4. It may be related to pyinstaller, but since I need to deploy the 
app on arbitrary 10.4 and later systems, omitting it is not an option. 

Pre conditions:
OS-X 10.5(.7/.8) with ppc or x86 arch
Xcode 3.1.3
Python-2.6.2
Qt-4.5.2
sip-4.8.2
PyQt-4.5.4

Build it this way:

tar xvzf launchprob.tar.gz  cd launchprob  ./build.sh -debug

This command will fetch pyinstaller's SVN trunk, build pyinstaller, generate 
the app itself: LaunchProb.app. It can be moved to any system, as long as 
all required packages are cleanly built for both archs(*) and the minimum 
OS-X release is 10.4. 

Any ideas how to solve this issue are greatly appreciated.

Thanks,
Pete

(*) I can provide more details for this on request


launchprob.tar.gz
Description: application/tgz
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Mac OS-X 10.5 and two icons bouncing in the dock problem

2009-08-14 Thread Bill Janssen
I guess the question is, why two dock icons?  I'm seeing something
perhaps similar; I have a Python-Cocoa app that when started will cause
one of those pop-up windows, App quit unexpectedly, do you want to
submit a bug report to Apple, and the crash report shows that a
multi-threaded program crashed in thread 0 with SEGV attempting to
access location 0.  But the app seems to be running, just fine.  When I
poked at it a bit more, it looks like using open or double-click to
launch the app somehow causes two instances to start (fork, somewhere?),
and one of them is bad.  This is with Xcode 3.1.3 and OS X 10.5, but no
Qt, no Python-2.6.2.

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


Re: [Pythonmac-SIG] py2app multiple executable files with a main launcher

2009-08-14 Thread Christopher Barker

Gabriel Rossetti wrote:

Christopher Barker wrote:

And no, I never did get that going -- we found another solution.



Thanks Chris, are you able to tell me what solution you found?


I don't think it's relevant to your problem, but we ended up embedding 
the whole darn thing in a wxPython application. Here's a PyCon 
presentation about it:


http://us.pycon.org/2009/conference/schedule/event/92/


-Chris





--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

chris.bar...@noaa.gov
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Mac OS-X 10.5 and two icons bouncing in the dock problem

2009-08-14 Thread Christopher Barker

Hans-Peter Jansen wrote:
The issue is not depending on the arch, but on OS-X 10.5. It does not happen 
with 10.4. It may be related to pyinstaller, but since I need to deploy the 
app on arbitrary 10.4 and later systems, omitting it is not an option. 


Well, it looks like Mac support it brand new (an not yet in a release 
version) for PyInstaller, so that is a likely culprit.


Have you tried py2app?

Anyway, It's great to hear that PyInstaller is working on Mac Support -- 
it'll be great to have a bundler that works on all three Major (and a 
few minor) platforms.


Does it build a proper application bundle? Has it been working well 
for you otherwise?


-Chris





--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

chris.bar...@noaa.gov
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Mac OS-X 10.5 and two icons b ouncing in the dock problem

2009-08-14 Thread Hans-Peter Jansen
Am Freitag, 14. August 2009 schrieb Christopher Barker:
 Hans-Peter Jansen wrote:
  The issue is not depending on the arch, but on OS-X 10.5. It does not
  happen with 10.4. It may be related to pyinstaller, but since I need to
  deploy the app on arbitrary 10.4 and later systems, omitting it is not
  an option.

 Well, it looks like Mac support it brand new (an not yet in a release
 version) for PyInstaller, so that is a likely culprit.

 Have you tried py2app?

Yes, 5 minutes ago. Apart from version.plist missing in Python 2.6.2 
framework and faking one, it did work, indeed.

 Anyway, It's great to hear that PyInstaller is working on Mac Support --
 it'll be great to have a bundler that works on all three Major (and a
 few minor) platforms.

Yes, that's pretty cool.

 Does it build a proper application bundle? 

That's not ready yet, but it's on the way.

 Has it been working well 
 for you otherwise?

Yes, it does (after fixing a few bugs, that prevented it from being really 
bi arch aka. universal build).

Pete

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


Re: [Pythonmac-SIG] Mac OS-X 10.5 and two icons bouncing in the dock problem

2009-08-14 Thread Bill Janssen
Anything having to do with Finder or the Dock (or Activity Monitor, for
that matter) seems to be somewhat over-simplified and mysterious.  Not
responding, in Activity Monitor, for instance, seems to be due to an
undocumented window server probe of processes marked somehow as
applications, for which Python has no built-in support.

I find Thread Viewer helpful in looking at programs.  But even
better is to build your own version of the system Python (2.5.1) with
debugging symbols, and use that instead of /usr/bin/python (or, of
course, you could use a different version of Python entirely).  Then you
can point gdb at that running application, and using the Python gdb
macros, http://wiki.python.org/moin/DebuggingWithGdb, you can see
exactly what's going on in all the threads.

I don't use pyinstaller, either.  I just build a standard OS X install
bundle by hand, and then as I develop just change the contents of of the
Resource subdirectory.

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