[Pythonmac-SIG] Sending stdout/err to a text console in a py2app App

Ronald Oussoren ronaldoussoren at mac.com
Tue Oct 12 20:00:40 CEST 2010


On 7 Oct, 2010, at 1:14, Gregory Jefferis wrote:

> Hello,
> 
> I've made a simple python script to wrap a complex, long running shell
> script using easygui.  Then I've used py2app to make a Mac Application.  I'm
> happy except I would really like stdout/stderr from both my python wrapper
> script and the original shell script to be visible as the shell script runs.
> If I run the app from the Terminal that happens.  But if I double click,
> everything gets sent to the system logs (which can be inspected with
> Console.app).  
> 
> Is there anyway I can send anything useful to that empty console windows
> that appears when I start the py2app ?  Or a simple way to make a new
> console to which I can print.
> 
> Thank you very much for any help you can offer,

There is no built-in way to do this. The easiest workaround is to grab the output of the script yourself (which is easy when using the subprocess module) and display that using an easygui text widget.

Ronald

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3567 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/pythonmac-sig/attachments/20101012/21f51112/attachment.bin>


More information about the Pythonmac-SIG mailing list