12 Dec
2001
12 Dec
'01
11:40 p.m.
Christopher N. Deckard wrote:
Is it possible to do something like this:
printed = ''
Nope. 'printed' is a magical variable created by Python-based Scripts, and they refuse to contemplate using it other than in a read-only context. You can accomplish what you want with the more explicit: from string import join snippets = [] pr = snippets.append pr('a line') pr('another line') ... pr('last line') text = join(snippets, '\n') + '\n' Cheers, Evan @ Zope