Maybe you can use __name__ to determine which module the print statement is in:

class out:
     def write(s,a):
         if __name__ =="myModule":
             mylog.write(a)
         else:
             sys.__stdout__.write(a)

sys.stdout = out()


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to