简体   繁体   中英

How do I run python file in mininent and where do I suppose to save the file

I have python file, I want to run in mininet. But I do not know where to save file and how to run it

Once you have created a node in Mininet, you can treat that node as if it was a virtual machine. You can simply use the name of the node followed by the name of your Python script, for example:

First I create a simple topology

sudo mn

Then I can call a Python script from inside any of the nodes in the topology:

h1 python3 ~/scripts/myscript.py

Further reading: http://mininet.org/walkthrough/#python-interpreter

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM