|
Re: [newbie] Question on embedding/extending with boost::python: msg#00293python.c++
Cross-posted to the C++ Sig. Please post all further replies there. Chris Heald wrote: Hi all --[snip] having trouble is with c and d - how do I give a Python app hooks into an I'm not entirely sure what your problem is. Have you looked at libs/python/test/embedding.cpp? It shows how your embedded interpreter can get access to the internals of the running C++ program. (Specifically, its classes.) Perhaps you can use that as a starting point? I had a co-worker suggest that I use Python as my primary execution Well, my common sense tells me that you may very well be right. But the important point is that there's really no way to tell, except for trying it out. (Profiling is the key.) And surely, writing the whole thing in Python (except for the critical sections) takes less time then writing the whole thing in C++ with just some things written in Python? Taking this road could very well lead to disappointing performance as you say. But then you'd still have gained experience from making the Python prototype, and its C++ bits can most-likely be recycled anyway. I don't really feel qualified to advise you to do one thing or the other. Embedding is sometimes the right/efficient way to do things, but such situations are becoming more and more rare. I am guessing that yours is such a situation, but you could argue that making a decision on such a guess is premature opimization (and therefore evil ;)). Perhaps others here can provide additional insights. Regards, Dirk Gerrits |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: set_wrapper: 00293, Nicodemus |
|---|---|
| Next by Date: | Re: Re: instantiating python objects within C++: 00293, Stefan Seefeld |
| Previous by Thread: | wrong semantics in boost/python/cast.hpp?i: 00293, Ralf W. Grosse-Kunstleve |
| Next by Thread: | Re: [newbie] Question on embedding/extending with boost::python: 00293, Brett Calcott |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |