Afra Arif
Afra Arif

Reputation: 27

Try to simulate first.py of ns3 using netanim

Can you please help me out about the below error
ubuntu@ubuntu:~/Desktop/ns-allinone-3.32/ns-3.32$ ./waf --pyrun scratch/first.py
Waf: Entering directory /home/ubuntu/Desktop/ns-allinone-3.32/ns-3.32/build' Waf: Leaving directory /home/ubuntu/Desktop/ns-allinone-3.32/ns-3.32/build' Build commands will be stored in build/compile_commands.json 'build' finished successfully (1.500s)
File "scratch/first.py", line 66
AnimationInterface netanim ("my_first.xml")
^ SyntaxError: invalid syntax

how can I fix this error please?

Upvotes: 0

Views: 417

Answers (1)

Sagar
Sagar

Reputation: 1870

I don't use the Python bindings, but take a look at this page from the manual. You will probably need to do something along the lines of

anim = ns.netanim.AnimationInterface("my_first.xml")

Upvotes: 1

Related Questions