[C++-sig] EXTERNAL: Re: pygccxml KeyError

Davidson, Josh josh.davidson at lmco.com
Mon Dec 19 21:07:03 CET 2011

May have been a bit too quick to respond.  Looks like setting the compilation mode can be used to have the project_reader_t use a source_reader_t.  Sorry about that.

-----Original Message-----
From: Davidson, Josh 
Sent: Monday, December 19, 2011 1:00 PM
To: 'Development of Python/C++ integration'
Subject: RE: EXTERNAL: Re: [C++-sig] pygccxml KeyError

Short of modifying the distribution, I don't see any way within Py++ to change the type of reader.  It seems to be hardcoded to project_reader_t:

    def __parse_declarations( self, files, gccxml_config, compilation_mode, cache, indexing_suite_version ):
        if None is gccxml_config:
            gccxml_config = parser.config_t()
        if None is compilation_mode:
            compilation_mode = parser.COMPILATION_MODE.FILE_BY_FILE
        start_time = time.clock()
        self.logger.debug( 'parsing files - started' )
        reader = parser.project_reader_t( gccxml_config, cache, decl_wrappers.dwfactory_t() )

-----Original Message-----
From: cplusplus-sig-bounces+josh.davidson=lmco.com at python.org [mailto:cplusplus-sig-bounces+josh.davidson=lmco.com at python.org] On Behalf Of Roman Yakovenko
Sent: Monday, December 19, 2011 12:37 PM
To: Development of Python/C++ integration
Subject: EXTERNAL: Re: [C++-sig] pygccxml KeyError

On Sat, Dec 17, 2011 at 2:23 AM, Davidson, Josh <josh.davidson at lmco.com> wrote:
> Hopefully, there's enough information in the traceback, but if not I 
> can try to sanitize an example.  I'm on rev 1856.

More or less. Sorry for late response, I was pretty busy.

>   File
> "c:\Python26\lib\site-packages\pygccxml\parser\project_reader.py",
> line 445, in _join_class_hierarchy

You are using project_reader_t class to parse a set of C++ files. This method is not reliable and pretty slow. I suggest you to use "source_reader_t" class.

Please read the project documentation, it explains how to start using it.

Cplusplus-sig mailing list
Cplusplus-sig at python.org

More information about the Cplusplus-sig mailing list