calendar.calendar()

calendar.calendar(year, w=2, l=1, c=6, m=3) Returns a 3-column calendar for an entire year as a multi-line string using the formatyear() of the TextCalendar class.

bz2.open()

bz2.open(filename, mode='r', compresslevel=9, encoding=None, errors=None, newline=None) Open a bzip2-compressed file in binary or text mode, returning a file object. As with the constructor for BZ2File, the filename argument can be an actual filename (a str or bytes object), or an existing file object to read from or write to. The mode argument can be any of 'r', 'rb', 'w', 'wb', 'x', 'xb', 'a' or 'ab' for binary mode, or 'rt', 'wt', 'xt', or 'at' for text mode. The default is 'rb'. The comp

bz2.decompress()

bz2.decompress(data) Decompress data. If data is the concatenation of multiple compressed streams, decompress all of the streams. For incremental decompression, use a BZ2Decompressor instead. Changed in version 3.3: Support for multi-stream inputs was added.

bz2.compress()

bz2.compress(data, compresslevel=9) Compress data. compresslevel, if given, must be a number between 1 and 9. The default is 9. For incremental compression, use a BZ2Compressor instead.

bz2.BZ2File.peek()

peek([n]) Return buffered data without advancing the file position. At least one byte of data will be returned (unless at EOF). The exact number of bytes returned is unspecified. Note While calling peek() does not change the file position of the BZ2File, it may change the position of the underlying file object (e.g. if the BZ2File was constructed by passing a file object for filename). New in version 3.3.

bz2.BZ2File

class bz2.BZ2File(filename, mode='r', buffering=None, compresslevel=9) Open a bzip2-compressed file in binary mode. If filename is a str or bytes object, open the named file directly. Otherwise, filename should be a file object, which will be used to read or write the compressed data. The mode argument can be either 'r' for reading (default), 'w' for overwriting, 'x' for exclusive creation, or 'a' for appending. These can equivalently be given as 'rb', 'wb', 'xb' and 'ab' respectively. If fi

bz2.BZ2Decompressor.unused_data

unused_data Data found after the end of the compressed stream. If this attribute is accessed before the end of the stream has been reached, its value will be b''.

bz2.BZ2Decompressor.needs_input

needs_input False if the decompress() method can provide more decompressed data before requiring new uncompressed input. New in version 3.5.

bz2.BZ2Decompressor.eof

eof True if the end-of-stream marker has been reached. New in version 3.3.

bz2.BZ2Decompressor.decompress()

decompress(data, max_length=-1) Decompress data (a bytes-like object), returning uncompressed data as bytes. Some of data may be buffered internally, for use in later calls to decompress(). The returned data should be concatenated with the output of any previous calls to decompress(). If max_length is nonnegative, returns at most max_length bytes of decompressed data. If this limit is reached and further output can be produced, the needs_input attribute will be set to False. In this case, th