[C++-sig] Re: Re: Embedding python in ns-2(tcl and c++) simulator?

Mike Rovner mike at nospam.com
Thu Feb 26 19:34:27 CET 2004


"Jiun-jie Huang" <jjhuang at cm.nctu.edu.tw> wrote in message
> one Bluetooth node is composed of C++ and python code; C++ handles
> lower layer, and Python handles higher layer.

Write another (high-level) bluetooth node in tcl and call your code from
there.

>...but if I can't successfully embed python in ns-2's C++ object...

Then don't. You can do either one:
1) embed python in tcl (see elmer
(http://www.python.org/cgi-bin/moinmoin/elmer) for example) and call it from
tcl
2) embed python in a separate c++ object and call it from "tcl c++" object
(see http://www.boost.org/libs/python/doc/tutorial/doc/embedding.html)

Regards,
Mike







More information about the Cplusplus-sig mailing list