[C++-sig] Inserting custom code into pyplusplus output

Roman Yakovenko roman.yakovenko at gmail.com
Tue Jun 13 20:13:20 CEST 2006


On 6/13/06, Niall Douglas <s_sourceforge at nedprod.com> wrote:
> On 13 Jun 2006 at 11:59, Roman Yakovenko wrote:
>
> > > if not how can I insert this custom code via pyplusplus?
> >
> > 1. You should exclude FXApp::init functions from being exposed, right?
> >
> > mb = module_builder_t( ... _
> > FXApp = mb.class_( 'FXApp' )
> > FXApp.member_functions( 'init' ).exclude()
> > init = """def("init", &FX::FXApp::init,
> > &TnFOX::FX_FXApp_Wrapper::default_init_3)"""
> > FXApp.add_code( init )
> > ...
>
> Unfortunately, FXApp::init is a required function for all GUI
> programs. It also mandatorily takes argc and argv.

I think I was not clear. I showed you the way to replace code that would
be generated by pyplusplus for FXApp::init member function, with your own code.

> > > We are very close to a working TnFOX python bindings. Yay!
> >
> > It is really good news :-). I am glad you find the time to work on this project.
> > I have few ideas about new GUI to pyplusplus. May be I will implement it using
> > Python bindings to TnFOX, we'll see.
>
> If pyplusplus doesn't yet support these things, I can also patch them
> in and supply a diff file to apply on the resulting bindings in the
> short term.

It is not as simple as I'd like it to be. I still try to find elegant
way to implement
this.

> It would be really great if we had a real world user of the TnFOX
> python bindings.

:-) I understand you.

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



More information about the Cplusplus-sig mailing list