call a python file from the cc file

30 views
Skip to first unread message

mand...@gmail.com

unread,
Sep 19, 2018, 3:36:26 AM9/19/18
to ns-3-users
Hi team,

I need to call a python module when I run the simulation file. I followed this http://tlab.hatenablog.com/entry/2013/01/12/234322 to work it executable in my ubuntu machine.  I could run the embedded python code inside the main method of my ns-3 simulation file successfully after adding `module.use.append('PYEMBED')` in the relevant wscript file. But I am having the problem of calling the python file from c++ code. 

Program received signal SIGSEGV, Segmentation fault.
0x00007fffeb5635cb in PyModule_GetDict () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0


Above error is generated in the execution process. So how can I fix this error? Any assistance would be highly appreciated. 

Thanks & Regards,
Mandula
Reply all
Reply to author
Forward
0 new messages