Thread: [pygccxml-development] How to use the readme() method?
Brought to you by:
mbaas,
roman_yakovenko
From: Matthias B. <ba...@ir...> - 2006-04-06 15:18:22
|
Hi, I've read in the cvs log about the new readme() method. Roman, can you please give some instructions on how this method is to be used? I noticed it returns a list, but what will the items be? The first argument to the method is called "calldef" instead of "self", so is this really supposed to be a "true" argument or is it self and you just gave it a different name? If it is a true argument, what is it supposed to be? - Matthias - |
From: Roman Y. <rom...@gm...> - 2006-04-06 15:30:17
|
On 4/6/06, Matthias Baas <ba...@ir...> wrote: > Hi, > > I've read in the cvs log about the new readme() method. Roman, can you > please give some instructions on how this method is to be used? Function readme should return list of strings. This list will contain some hints/tips/warnings to the user, that py++ has to say about the declaration. > I > noticed it returns a list, but what will the items be? The first > argument to the method is called "calldef" instead of "self", so is this > really supposed to be a "true" argument or is it self and you just gave > it a different name? Of course it should be self. In that moment I thought about adding functionality to calldef decl wrapper. For imlementation and usage, please take a look on calldef_wrapper.py and decl_wrapper_printer.py modules. > - Matthias - Thank you -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |
From: Matthias B. <ba...@ir...> - 2006-04-06 17:25:25
|
Roman Yakovenko wrote: > For imlementation and usage, please take a look on calldef_wrapper.py and > decl_wrapper_printer.py modules. How can a user find out/iterate over all declarations that "have something to say"? (other than iterating over all declarations and check if readme() returns something else than an empty list) - Matthias - |
From: Roman Y. <rom...@gm...> - 2006-04-06 18:33:14
|
On 4/6/06, Matthias Baas <ba...@ir...> wrote: > Roman Yakovenko wrote: > > For imlementation and usage, please take a look on calldef_wrapper.py a= nd > > decl_wrapper_printer.py modules. > > How can a user find out/iterate over all declarations that "have > something to say"? (other than iterating over all declarations and check > if readme() returns something else than an empty list) This is the only way. And here is the reason: I don't expect users will actually investigate what is written there at run time and make some decision. I think they will print the content of readme and after this, they will go and add some treatment to problematic declarations. Obviously you have an other opinion, please share it :-) > - Matthias - -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |
From: Matthias B. <ba...@ir...> - 2006-04-07 09:22:57
|
Roman Yakovenko wrote: >> How can a user find out/iterate over all declarations that "have >> something to say"? (other than iterating over all declarations and check >> if readme() returns something else than an empty list) > > This is the only way. And here is the reason: I don't expect users > will actually investigate > what is written there at run time and make some decision. I think they > will print the content > of readme and after this, they will go and add some treatment to > problematic declarations. ok, but I think those messages should never be silently ignored (unless the user wants it that way). Currently, the user has to be the "active part" and has to inspect the messages (by writing quite a bit of code), otherwise they get ignored. I'd like to see pyplusplus to take over the active part on this issue (as it would otherwise produce code that doesn't work). This can also be done in the "high level layer", that's why I wanted to check what the recommended way to obtain those messages efficiently is. - Matthias - |
From: Roman Y. <rom...@gm...> - 2006-04-07 17:21:35
|
On 4/7/06, Matthias Baas <ba...@ir...> wrote: > ok, but I think those messages should never be silently ignored (unless > the user wants it that way). Currently, the user has to be the "active > part" and has to inspect the messages (by writing quite a bit of code), > otherwise they get ignored. I'd like to see pyplusplus to take over the > active part on this issue (as it would otherwise produce code that > doesn't work). This can also be done in the "high level layer", that's > why I wanted to check what the recommended way to obtain those messages > efficiently is. I understand what are you talking about. I think that module_creator.creato= r_t class should print into the logger those read messages. What do you think? pyplusplus can do nothing before that point. > - Matthias - -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |