[C++-sig] pyplusplus simple test failure

Neal Becker ndbecker2 at gmail.com
Mon Feb 13 21:28:58 CET 2006

I'm curious about pyplusplus.  I tried a simple test and got an error.  Any ideas?

python test.py
Traceback (most recent call last):
  File "test.py", line 17, in ?
    decls_all = parser.parse( ['hello_world.hpp'], parser_config )
  File "/usr/lib/python2.4/site-packages/pygccxml/parser/__init__.py", line 25, in parse
    answer = parser.read_files(files, compilation_mode)
  File "/usr/lib/python2.4/site-packages/pygccxml/parser/project_reader.py", line 61, in read_files
    return self.__parse_file_by_file(files)
  File "/usr/lib/python2.4/site-packages/pygccxml/parser/project_reader.py", line 82, in __parse_file_by_file
    decls = reader.read_file( header )
  File "/usr/lib/python2.4/site-packages/pygccxml/parser/source_reader.py", line 140, in read_file
    raise error
KeyError: u'complex long double'

Here is test.py and hello_world.hpp:
import os
from pygccxml import parser
from pygccxml import declarations
from pyplusplus import code_creators
from pyplusplus import module_creator
from pyplusplus import file_writers

class settings:
    gccxml_path = '/usr/bin'
    working_dir = '/home/nbecker/tmp'

#configurating parser
parser_config = parser.config_t( gccxml_path=settings.gccxml_path, working_directory=settings.working_dir )
##parser_config = parser.config_t()

#reading all declarations
decls_all = parser.parse( ['hello_world.hpp'], parser_config )

#filtering declarations
decls = declarations.filtering.by_location( decls_all, [settings.working_dir] )
int F (int x);

More information about the Cplusplus-sig mailing list