redirect or cover .bat log

Diez B. Roggisch deets at nospam.web.de
Wed Aug 22 04:52:54 EDT 2007


 vedrandekovic at v-programs.com wrote:

> On 22 kol, 09:19, "Diez B. Roggisch" <de... at nospam.web.de> wrote:
>> vedrandeko... at v-programs.com schrieb:
>>
>> > Hello,
>>
>> > e.g I need run my my_scripts_setup.bat that contain:
>>
>> > python myscript_setup.py py2exe
>>
>> > Can I cover or redirect log of that process into my wx program?
>> > I'am using Windows XP SP2, and Python 2.5.
>>
>> Who's running the bat, and who's running the wx program?
>>
>> Diez
> 
> Hi,
> 
> First I convert my main wx program to exe with my py2exe setup,then
> under my main program (exe),
> I must run that .bat file and redirect or cover that process.

Still not very clear. But running a bat-file should be possible with the
subprocess module that also has facilities to grab stdout of the child
process.

Diez



More information about the Python-list mailing list