Re: [pygccxml-development] improving user experience
Brought to you by:
mbaas,
roman_yakovenko
From: Roman Y. <rom...@gm...> - 2006-07-24 14:26:46
|
On 7/24/06, Matthias Baas <ba...@ir...> wrote: > Sounds good! I've already played around with this a bit and did some > tests. I have some questions though: > > readme() returns a list of strings. What exactly are these strings? This list contains different messages py++ wants to pass to users > Is each string a separate info/warning message or is the concatenation of > the strings one single warning message? Every string( item in the list ) is separate message. This is because we have an hierarchy of declarations. So every level within hierarchy add an information it has. > In what way is the first string > special? There is the following code in creator_t._prepare_decls() which > I don't quite understand: Well, it is some kind of work around, laziness, lack of good idea ,... Please take a look on decl_wrapper_t.readme method. If declaration is not exportable, than the reason will be the first item within the string. > By the way, are there other places where warnings are written to the > logger? (it appears to me that this is the only location) It should be the only place, otherwise this is a bug > I've already modified the above so that the log message is one single > line. The line consists of two fields containing the declaration string > and the actual message separated by a colon: > > <decl>;<msg> Good. > Additionally I wrote a custom formatter that makes the message more > readable again by splitting the declaration string and message up again > and using the textwrap module to prevent long lines. Example: That is exactly what I meant. > > To make it apparent where a new warning message begins, the actual text > is indented by 2 blanks. The '->' line should make the beginning of the > actual message easier to spot (which otherwise can get difficult with > long declarations). Good for you - good for me. > What is the proper place for the new formatter? Currently, I would put > it into the _logging_ module and use it as formatter for the default > stream logger which goes to stdout. Yes. > For my additional custom file logger I would simply use a standard > formatter which leaves everything in one line to make it more > 'grep'-friendly. So I guess everyone's happy then! :) I am glad you find time and implemented this feature. > 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 :-))))). Thank you very much!!! -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |