468,769 Members | 2,269 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,769 developers. It's quick & easy.

redirect or cover .bat log

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.


Regards,
Vedran

Aug 22 '07 #1
5 1352
ve***********@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
Aug 22 '07 #2
On 22 kol, 09:19, "Diez B. Roggisch" <de...@nospam.web.dewrote:
vedrandeko...@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.
Regards,
Vedran

Aug 22 '07 #3
ve***********@v-programs.com wrote:
On 22 kol, 09:19, "Diez B. Roggisch" <de...@nospam.web.dewrote:
>vedrandeko...@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
Aug 22 '07 #4
On 22 kol, 10:52, "Diez B. Roggisch" <de...@nospam.web.dewrote:
vedrandeko...@v-programs.com wrote:
On 22 kol, 09:19, "Diez B. Roggisch" <de...@nospam.web.dewrote:
vedrandeko...@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
Hi,

Can I execute one .bat file (without opening .bat window) just execute
commands
and log process redirect with sys.stdout or something in my wx window?

Is this clear enough?

Have you any other solutions for this?

Regards,
Vedran

Aug 22 '07 #5
ve***********@v-programs.com a écrit :
Can I execute one .bat file (without opening .bat window) just execute
commands
and log process redirect with sys.stdout or something in my wx window?

Is this clear enough?
Type "help cmd" in a Windows console, then grab ad-oc options (/C and /A
or /U seem good candidates).
To completly hide the console... I dont know. But i have a set of .bat
scripts for a large application integration, they are started via
"start" (see help start) and with the /min option to have console
minimized in the task bar. Minimized, not completly invisible.

[for the remaining, its just subprocess module usage - see examples in
doc - and reading from output]

A+

Laurent.
Aug 22 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Jim in Arizona | last post: by
9 posts views Thread by Hugh Janus | last post: by
reply views Thread by Stuart Palmer | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.