[C++-sig] pyplusplus tutorials & GUI wizard

Matthias Baas baas at ira.uka.de
Tue Jan 24 16:34:23 CET 2006


Roman Yakovenko wrote:
> Hi. pyplusplus project made first step towards ( better ) documentation.
> I created step by step tutorials.
> [...]
> All comments, suggestions or correction are welcome.

It's good to see a more or less introductory tutorial as I couldn't 
extract enough information from the previous pages to get started with 
pyplusplus.

First, there's a typo on the page and a bug in the code:

- In step 3 of the tutorial you access the attribute 
"parser_configuration.working_directory" whereas a few lines above the 
configuration object was called "parser_config".

- In method __raise_on_wrong_settings() in 
pygccxml/parser/source_reader.py the variable environment_var_delimiter 
is only defined on Windows but not on other platforms which will raise 
an exception on those other platforms some lines later in the method 
(when the variable is used).


Now to pyplusplus itself, as a "hello world" example I found the 
required Python script rather complicated. It feels as if a lot of the 
code in those driver scripts will be identical among projects, so why 
does this have to be provided by the user and why isn't it put under the 
hood of pyplusplus instead? Personally I'd prefer the "signal-to-noise 
ratio" in the config/driver file to be as high as possible, i.e. the 
file should only contain information that really must be provided by the 
user and that pyplusplus cannot know itself. In the tutorial this would 
be the input file name and maybe the output module name (which could 
even be deduced from the input file name by default). I would say Pyste 
performs much better in this respect as its "hello world" example only 
requires a single line.
So I'd suggest to add a command line tool to pyplusplus that reads a 
config file (Python code) that can contain the required information in a 
much more concise manner. You wouldn't loose any flexibility and you 
could remove any "unnecessary" code (that would always be the same). An 
additional benefit of having a separate command line tool would be that 
there is something I can invoke and request some help from it.

Another wish of mine would be to output some descriptive information (or 
a log file) about what the program is currently doing. For example, I 
tried to wrap a class from a commercial SDK but failed (the output file 
is almost empty and I get another file __array_1.pypp.hpp that is 
neither referenced in the actual output file nor does it contain 
anything that looks as if it was related to the classes in the SDK). I 
have no idea what went wrong as there hasn't been any message at all 
(let alone an error or warning message). Here, it would be useful if the 
program would output what it saw in the input file (how many classes, 
functions, etc.) and what it is going to output, etc.

So at the end, this round went to Pyste, but I'm eagerly awaiting the 
next rounds... :)
(I'll definitely keep an eye on pyplusplus as with using Pyste I had to 
add some manual tweaks, so it's not perfect as well)

- Matthias -




More information about the Cplusplus-sig mailing list