[C++-sig] [Py++] Include additional code with ctypes code generator

Roman Yakovenko roman.yakovenko at gmail.com
Mon Dec 14 20:33:19 CET 2009


On Mon, Dec 14, 2009 at 4:00 PM, Nikolaus Rath <Nikolaus at rath.org> wrote:
> Hello,
>
> Is there a way to add additional code to the output generated by the
> ctypes code generator? Specifically, I would like to add some special
> comments to prevent the autogenerated files being checked by PyLink and
> PyDev.
>
> http://language-binding.net/pyplusplus/documentation/inserting_code.html
> talks about a add_registration_code method, but it doesn't seem to exist
> for the ctypes generator:
>
> mb = ctypes_module_builder_t( [header_file], symbols_file, gccxml_config=gccxml_cfg )
> mb.build_code_creator(shared_library_file)
> mb.add_registration_code( '#@PyDevCodeAnalysisIgnore', False )
>
> yields
>
> AttributeError: 'ctypes_module_builder_t' object has no attribute
> 'add_registration_code'
>

Right now - there is no such way. I will try to add this functionality
today or tomorrow.


-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/


More information about the Cplusplus-sig mailing list