From: Astan Chee on
Hi,
I'm trying to make one of those frames thats similar to the wx python
demo where a folder is filled with demo wx python scripts and there is
one main script that opens the other ones in as different items in a
tree/notebook.
I've gotten most of it figured out except the part where the scripts are
executed in a wx frame. The difference between what I'm trying to do and
the wx python demo one is that mine are generic scripts that output the
results to std out/error (or whatever gets displayed in IDLE). Does
anyone know how I can do this? Simulate a IDLE or python shell in one of
the frames thats basically the output of whatever script has been
selected to run?
It would be better if the solution was platform independent too.
Thanks for any suggestions
From: Philip Semanchuk on

On Jul 13, 2010, at 11:15 AM, Astan Chee wrote:

> Hi,
> I'm trying to make one of those frames thats similar to the wx
> python demo where a folder is filled with demo wx python scripts and
> there is one main script that opens the other ones in as different
> items in a tree/notebook.
> I've gotten most of it figured out except the part where the scripts
> are executed in a wx frame. The difference between what I'm trying
> to do and the wx python demo one is that mine are generic scripts
> that output the results to std out/error (or whatever gets displayed
> in IDLE). Does anyone know how I can do this? Simulate a IDLE or
> python shell in one of the frames thats basically the output of
> whatever script has been selected to run?
> It would be better if the solution was platform independent too.

Hi Astan,
The subprocess module allows you to capture the stdin/stdout/stderr of
a process that you launch. This sounds like what you're looking for.


bye
Philip