with block for multiple files

James Mills prologic at shortcircuit.net.au
Mon Nov 1 06:13:44 CET 2010


On Mon, Nov 1, 2010 at 3:03 PM, Yingjie Lan <lanyjie at yahoo.com> wrote:
> with open('scores.csv'), open('grades.csv', wt) as f,g:
>     g.write(f.read())

One could write their own ContextManager here...

cheers
James

-- 
-- James Mills
--
-- "Problems are solved by method"



More information about the Python-list mailing list