how to make my log more flexible?
Anthony Baxter
anthony at interlink.com.au
Sun Oct 19 23:33:23 EDT 2003
>>> "Frank Zheng" wrote
> for example:
> def fun(log):
> ...#do some sth
> log.write('do some sth')
>
> at run time:
> fun(open('mylogfile.log','w'))
>
> Now, I want do some unit test first, my question is what param to be passed
> to 'fun' can make 'log.write(...)' work as 'print'?
sys.stdout or sys.stderr.
Anthony
--
Anthony Baxter <anthony at interlink.com.au>
It's never too late to have a happy childhood.
More information about the Python-list
mailing list