Update of /cvsroot/freevo/freevo/src
In directory sc8-pr-cvs1:/tmp/cvs-serv14089
Modified Files:
childapp.py
Log Message:
a small change. gonna use childapp in command.py soon. allows me to change filenames
to ones command.py looks for
Index: childapp.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/childapp.py,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -d -r1.43 -r1.44
*** childapp.py 28 Nov 2003 20:23:43 -0000 1.43
--- childapp.py 6 Dec 2003 17:50:52 -0000 1.44
***************
*** 10,13 ****
--- 10,16 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.44 2003/12/06 17:50:52 mikeruelle
+ # a small change. gonna use childapp in command.py soon. allows me to change
filenames to ones command.py looks for
+ #
# Revision 1.43 2003/11/28 20:23:43 dischi
# renamed more config variables
***************
*** 126,130 ****
class ChildApp:
! def __init__(self, app):
global __all_childapps__
__all_childapps__.append(self)
--- 129,133 ----
class ChildApp:
! def __init__(self, app, debugname=None, doeslogging=0):
global __all_childapps__
__all_childapps__.append(self)
***************
*** 185,188 ****
--- 188,197 ----
debug_name = debug_name
+ if debugname:
+ debug_name = debugname
+
+ if doeslogging or config.CHILDAPP_DEBUG:
+ doeslogging = 1
+
self.child = util.popen3.Popen3(start_str)
self.outfile = self.child.fromchild
***************
*** 190,198 ****
self.infile = self.child.tochild
! self.t1 = Read_Thread('stdout', self.outfile, self.stdout_cb, debug_name)
self.t1.setDaemon(1)
self.t1.start()
! self.t2 = Read_Thread('stderr', self.errfile, self.stderr_cb, debug_name)
self.t2.setDaemon(1)
self.t2.start()
--- 199,207 ----
self.infile = self.child.tochild
! self.t1 = Read_Thread('stdout', self.outfile, self.stdout_cb, debug_name,
doeslogging)
self.t1.setDaemon(1)
self.t1.start()
! self.t2 = Read_Thread('stderr', self.errfile, self.stderr_cb, debug_name,
doeslogging)
self.t2.setDaemon(1)
self.t2.start()
***************
*** 331,335 ****
class Read_Thread(threading.Thread):
! def __init__(self, name, fp, callback, logger=None):
threading.Thread.__init__(self)
self.name = name
--- 340,344 ----
class Read_Thread(threading.Thread):
! def __init__(self, name, fp, callback, logger=None, doeslogging=0):
threading.Thread.__init__(self)
self.name = name
***************
*** 337,341 ****
self.callback = callback
self.logger = None
! if logger and config.CHILDAPP_DEBUG:
logger = os.path.join(config.LOGDIR, '%s-%s.log' % (logger, name))
try:
--- 346,350 ----
self.callback = callback
self.logger = None
! if logger and doeslogging:
logger = os.path.join(config.LOGDIR, '%s-%s.log' % (logger, name))
try:
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog