how to wrap multi files(*.cc, *.h) to python by pyste or boost.python?

Dear all, I know how to wrap a single file to python. I have several files and I don't want to rewrite them into a large single file. How to wrap them to python? Thanks very much! Best wishes! -- Qinfeng(Javen) Shi Research School of Information Sciences and Engineering Australian National University Locked Bag 8001 Canberra ACT 2601

On Mon, 4 Sep 2006, Qinfeng(Javen) Shi wrote:
Dear all,
I know how to wrap a single file to python. I have several files and I don't want to rewrite them into a large single file. How to wrap them to python?
One possible way to do this manually: file1.hpp: export_stuff_from_file1() ; file1.cpp: void export_stuff_from_file1() { // Do your Boost.Python calls here for your stuff corresponding to // this file } // Same for file2, file3, etc. main_module_file.cpp: #include "file1.hpp" //... BOOST_PYTHON_MODULE( your_module ) { export_stuff_from_file1() ; // ... } -- François Duranleau LIGUM, Université de Montréal
participants (2)
-
François Duranleau
-
Qinfeng(Javen) Shi