<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<STYLE type=text/css> <!--@import url(D:\Program Files\NeteaseMail\Netease\网易闪电邮\\data\scrollbar.css); --></STYLE>
<META name=GENERATOR content="MSHTML 8.00.7600.16766"><BASE
target=_blank></HEAD>
<BODY
style="LINE-HEIGHT: 1.3; BORDER-RIGHT-WIDTH: 0px; MARGIN: 12px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px"
marginheight="0" marginwidth="0"><STATIONERY>
<DIV>
<DIV><FONT color=#000000 size=3 face=宋体>Hi friends:</FONT></DIV>
<DIV> </DIV>
<DIV>Here I need some help.</DIV>
<DIV> </DIV>
<DIV>#encoding="utf-8"<BR>#moudle a.py<BR>def a():<BR> print "
function a!"</DIV>
<DIV> </DIV>
<DIV>#encoding="utf-8"<BR>#moudle b.py<BR>def b():<BR> print "
function b!"</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>#encoding="utf-8"<BR>#moudle c.py</DIV>
<DIV>import a</DIV>
<DIV>import b</DIV>
<DIV>def c():<BR> a.a()</DIV>
<DIV style="TEXT-INDENT: 2em">b.b()</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Here in function c,How can i record all the information printed
by a and b with out modifying moudle a and b?</DIV>
<DIV>I want to output all the printed information into a text file.</DIV>
<DIV> </DIV>
<DIV>Need your help, thanks a lot!</DIV>
<DIV> </DIV>
<DIV>Best Regards</DIV>
<DIV><FONT color=#000000 size=3 face=宋体></FONT> </DIV>
<DIV align=left><FONT color=#c0c0c0 size=2
face=Verdana>2011年04月28日</FONT></DIV><FONT size=2 face=Verdana>
<HR style="WIDTH: 122px; HEIGHT: 2px" id=SignNameHR align=left SIZE=2>