Re: [pygccxml-development] improving user experience
Brought to you by:
mbaas,
roman_yakovenko
From: Matthias B. <ba...@ir...> - 2006-07-24 16:17:07
|
Roman Yakovenko wrote: >> Roman, does this sound good to you and can I commit that stuff or do you >> have any objections/suggestions, etc? > > No. Please commit the code ASAP :-))))). Done. The _logging_ sub-module now contains a new class multi_line_formatter_t that splits long messages into several lines. The class is used just like the logging.Formatter class. The constructor takes one additional argument 'width' (default: 70) that controls the maximum width of the generated text blocks. What the new formatter actually does is that it modifies the 'message' attribute of a log record (i.e. it inserts newlines based on 'width' using the textwrap module). The new formatter is now used for the default handler that outputs the log messages to stdout. So you don't have to do anything to see the new message layout. If anybody wants to use the formatter for his own handlers you can access the class via pyplusplus.multi_line_formatter_t: I left the code structure in creator_t._prepare_decls() as it is and just converted the messages into single-line messages. Maybe this code could be shortened a bit as the generated message for the first item in readme and the subsequent items are actually identical. - Matthias - |