Just a general question

21 views
Skip to first unread message

pp

unread,
Aug 8, 2018, 12:49:56 AM8/8/18
to ns-3-users
Hello,

I just had a basic question.what are bindings for?How do they help in execution of python scripts?What language are they written in?What are wrapper classes?

Tom Henderson

unread,
Aug 8, 2018, 1:01:43 AM8/8/18
to ns-3-...@googlegroups.com
Bindings make the C++ objects accessible from Python. This
documentation describes them and the process to generate them:

https://www.nsnam.org/docs/manual/html/python.html

- Tom
Message has been deleted

pp

unread,
Aug 8, 2018, 1:12:44 AM8/8/18
to ns-3-users
These bindings are written in c++/Python?

Tom Henderson

unread,
Aug 8, 2018, 9:20:06 AM8/8/18
to ns-3-...@googlegroups.com
On 08/07/2018 10:12 PM, pp wrote:
> These bindings are written in c++/Python?


The API definitions for ns-3's libraries are written in Python, and a
tool called 'pybindgen' generates the C++ binding code which is then
compiled and linked to form the Python module. So, technically, the
bindings are in C++ but that C++ code is generated by the bindings
generator pybindgen.

You may want to review pybindgen's tutorial for answers to these types
of questions:
https://pythonhosted.org/PyBindGen/tutorial.html

- Tom
Reply all
Reply to author
Forward
0 new messages