1.1 --- a/vCalendar.py Thu Apr 25 19:20:10 2013 +0200
1.2 +++ b/vCalendar.py Thu Apr 25 19:30:19 2013 +0200
1.3 @@ -192,13 +192,16 @@
1.4
1.5 return vContent.iterparse(stream_or_string, encoding, non_standard_newline, vCalendarStreamParser)
1.6
1.7 -def iterwrite(stream_or_string, encoding=None, line_length=None):
1.8 +def iterwrite(stream_or_string=None, write=None, encoding=None, line_length=None):
1.9
1.10 """
1.11 - Return a writer which will send data to the resource found through the use
1.12 - of 'stream_or_string', which is either a stream accepting Unicode data (the
1.13 - codecs module can be used to open files or to wrap streams in order to
1.14 - accept Unicode data) or a filename identifying a file to be parsed.
1.15 + Return a writer which will either send data to the resource found through
1.16 + the use of 'stream_or_string' or using the given 'write' operation.
1.17 +
1.18 + The 'stream_or_string' parameter may be either a stream accepting Unicode
1.19 + data (the codecs module can be used to open files or to wrap streams in
1.20 + order to accept Unicode data) or a filename identifying a file to be
1.21 + written.
1.22
1.23 The optional 'encoding' can be used to specify the character encoding used
1.24 by the file to be written.
1.25 @@ -207,6 +210,6 @@
1.26 in the resulting data.
1.27 """
1.28
1.29 - return vContent.iterwrite(stream_or_string, encoding, line_length, vCalendarStreamWriter)
1.30 + return vContent.iterwrite(stream_or_string, write, encoding, line_length, vCalendarStreamWriter)
1.31
1.32 # vim: tabstop=4 expandtab shiftwidth=4