Christopher Barker wrote:
> yardbird wrote:
>   
>> On Saturday 16 December 2006 19:42, Xavier Gnata wrote:
>>     
>
>   
>>> Each time I'm working on C++ codes using vector or valarray, I would
>>> like to be able to plot them.
>>>       
>
>   
>> you should really check out the Boost::Python libraries. They allow you, 
>> among 
>> other things, to expose your C++ container classes as python objects. I'm 
>> using them heavily in my project and I'm very satisfied.
>>     
>
> What this means is that you'd be using python to drive your C++ code, 
> rather than using C++ code to drive a python/mpl code. In addition to 
> Boost::Python, there are some other options to consider:
>
> pyrex, Cxx, SWIG.
>
> The other option is to use your C++ code to drive Python. This can be 
> done by embedding a python interpreter in your C++ app. See the 
> odfficial pyhton docs, and lots of other stuff online.
>
> You also might want to check out Elmer:
>
> http://elmer.sourceforge.net/
>
> I've never used it, but it looks pretty cool. It's a tool that provides 
> the infrastructure for calling python from C/C++.
>
> Honestly, though, I'd go with the first approach -- drive your C++ code 
> from Python -- I think that in addition to making it easy to plot 
> results, etc, you'll be able to write unit tests, etc in python, and 
> even get a full scripting engine, which could turn out to be very useful..
>
> -Chris
>   
Hi,

I do agree that driving C++ from python looks easier thant driving
python from C++.
However, I really would like to inclue python  code into my C++ code and
not the opposite (I have special needs so I really have to do that).

I'm going to have a look at embedding python.
Has anyone experience with that?
 
Xavier



-- 
############################################
Xavier Gnata
CRAL - Observatoire de Lyon
9, avenue Charles André
69561 Saint Genis Laval cedex
Phone: +33 4 78 86 85 28
Fax: +33 4 78 86 83 86
E-mail: [EMAIL PROTECTED]
############################################ 


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to