[C++-sig] KeyError: u'complex long double' in pyplusplus for a helloworld class

Grant Tang gtang at blake.bcm.tmc.edu
Thu Feb 16 21:04:23 CET 2006


Grant Tang wrote:

Thanks for replies in c++-sig group. I tried to get the CVS copy of pyplus
and pygccxml by following the instruction of the pygccxml web page but got
this:

cvs -z3 -d:pserver:anonymous at cvs.sourceforge.net:/cvsroot/pygccxml co -P
pyplusplus                 
cvs server: cannot find module `pyplusplus' - ignored
cvs [checkout aborted]: cannot expand modules

anybody can help me?

Thanks,
Grant

> I am learning how to use pyplusplus. I hope I can use pyplusplus to
> substitute Pyste for our project.
> I just follow the code example in the tutorial:
> 
>>>> import os
>>>> from pygccxml import parser
>>>> from pygccxml import declaration
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> ImportError: cannot import name declaration
>>>> from pygccxml import declarations
>>>> from pyplusplus import code_creators
> ImportError: cannot import name module_creators
>>>> from pyplusplus import module_creator
>>>> from pyplusplus import file_writers
>>>> class settings:
> ...     gccxml_path = '/usr/local/bin'
> ...     working_dir = '/home/gtang/tmp'
> ...
>>>> parser_config = parser.config_t( gccxml_path=settings.gccxml_path,
> working_directory=settings.working_dir )
>>>> decls_all = parser.parse( ['/home/gtang/test/pyplusplus
>>>> _test/hello.h'],
> parser_config )
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "/usr/lib64/python2.4/site-packages/pygccxml/parser/__init__.py",
> line 25, in parse
>     answer = parser.read_files(files, compilation_mode)
>   File
> "/usr/lib64/python2.4/site-packages/pygccxml/parser/project_reader.py",
> line 61, in read_files
>     return self.__parse_file_by_file(files)
>   File
> "/usr/lib64/python2.4/site-packages/pygccxml/parser/project_reader.py",
> line 82, in __parse_file_by_file
>     decls = reader.read_file( header )
>   File
> "/usr/lib64/python2.4/site-packages/pygccxml/parser/source_reader.py",
> line 140, in read_file
>     raise error
> KeyError: u'complex long double'#include <iostream>
> 
> I also tried to use pyplusplus GUI, got the same error message.
> 
> the hello.h is:
> using namespace std;
> 
> class A
> {
> public:
>         A() {cout << "class A's constructor..." << endl;}
>         ~A() {cout << "class A's destructor..." << endl;}
> };
> 
> Thanks in advance,
> 
> 
> --
> Grant Tang





More information about the Cplusplus-sig mailing list