Amazing technological breakthrough possible @S-Logix

Office Address

  • #5, First Floor, 4th Street Dr. Subbarayan Nagar Kodambakkam, Chennai-600 024 Landmark : Samiyar Madam
  • +91- 81240 01111

Social List

How to Compile a Python Script in Mininet

Step by Step Compile a Python Script in Mininet


       A Python script is the terrific defined as a Python file that holds commands in a sequentially logical order. The python program should do something really and anything when it sprint through the Python interpreter. It is commonly used to evolve task automation, data analysis, data visualization, websites, and software. To compile a python script in mininet, make sure that it automatically compiles all Python files using the compile all module. Users can also do it from the shell prompt by running compile, providing the path of the directory holding the Python files to compile.

      Follow the given sample and procedure discussed below in a given section that how to Compile a Python Script with Mininet.

       If you like to create custom topologies with Mininet, then you can use python scripts

      So, to compile python scripts on Mininet, first, type the command mentioned below to check whether you have python ide


      If you see something python version such as python 3.6.5 or any other version, that means you have a python ide

      To exit from python-mode


      Note: that the commands that you use in the Linux terminal are also applicable in the Mininet terminal

      Let us create a folder for python scripts

      mkdir Mininet_scripts

      Get in the directory or folder Mininet_scripts

      cd Mininet_scripts

      Create a python file and edit it


      Type your python script

      print(“this is just a simple script to test”)

      Save and exit the python program with a short key  Ctrl+d

      Compile the python script

      Sudo python

      If you like to edit the saved program, then you can do it by using the below command


      To exit the nano command, use Ctrl+x