capturing stderr && stdout
drek at MonsterByMistake.Com
Tue Nov 2 20:18:47 CET 1999
I have searched the web and all the python documents/examples I could find
before posting here. My apologies if I have missed the obvious :) (I bought
two books as well that I am going through)
Alot of what I need to do with python depends on launching and controlling
a subprogram called hscript. It's a 'closed' application that is not a full
bodied language like python. I am hoping to launch one instance of hscript
write to it and keep its stdout && stderr.
Most of our work gets done with csh scripts like the following:
#csh stuff goes here
hscript -q $HIPDIR/$HIPFILE << ENDCAT >>&! $LOG
# now I write hscript commands
here's a stripped down version of what I have thus far.
import os, sys
HSCRIPT = "hscript"
p = os.popen("%s" % HSCRIPT, "w")
This is great so far but I just need stderr from hscript (just in case it
crashes:) and stdout (to keep a neat log file)
This will need to work on *nix.
I'm trying to move to python as our main scripting language so that we can
reuse code and integrate a gui (tkinter) easily into our apps.
If you're interested in what hscript is you can visit http://www.sidefx.com/
and check out houdini.
thanks for any tips,
Monster By Mistake Inc > 'digital plumber'
mailto:drek at monsterbymistake.com
"This mail was powered by Linux & Vim"
More information about the Python-list