I found the following script on the net. I use it to run and debug my ryu apps. You can modify the script according to your need. You need to change the "main_app" to your application name. You should also place this script in the same path as your ryu app (or you might as well specify its path address).
#!/usr/bin/env python import sys from ryu.cmd import manager def main(): sys.argv.append('--ofp-tcp-listen-port') sys.argv.append('6653') # sys.argv.append('static') sys.argv.append('main_app') # sys.argv.append('--verbose') sys.argv.append('--enable-debugger') sys.argv.append('--observe-links') manager.main() if __name__ == '__main__': main() <https://www.avast.com/en-in/recommend?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=default3&tag=d9c663a6-a170-4bc5-9014-0914d2d8eaac> I’m protected online with Avast Free Antivirus. Get it here — it’s free forever. <https://www.avast.com/en-in/recommend?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=default3&tag=d9c663a6-a170-4bc5-9014-0914d2d8eaac> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> On Sun, Nov 18, 2018 at 10:20 PM Soe Ye Htet <soeyehtet1...@gmail.com> wrote: > Hi, > > Please let me share what I have known. In python, there is library which > is called os package. That package is used to call linux command in python > application. > > Import os > > In the place that you want to call ryu application, you can write > os.system("ryu-manager xxxxx"). If you want to run ryu application in the > background, you can put "&" at the end of the command line such as > os.system("ryu-manager xxxxx &"). > I hope you can run ryu application in python application. > > Best Regards, > Soe Ye Htet > Master Engineering Student > Chulalongkorn University, Thailand > > On Sun, Nov 18, 2018, 6:28 PM Ha Nguyen <nvso...@gmail.com wrote: > >> Hi Ryu Team, >> >> I do not want to launch Ryu application via the ryu-manager in Terminal, >> but rather directly within a Python script. Then I can integrate everything >> in one python script, instead of calling ryu-manager in Terminal, topology >> build in another Terminal, and so on. >> >> I am looking forward to hearing from you. >> >> Best Regards, >> Ha >> >> -- >> *Nguyen Vo Son Ha* >> >> Master Student (Communications Engineering) >> *Technical University of Munich (TUM)* >> D-80290 Munich, Germany >> >> Mob: +49 159 023 88172 >> Email: nvso...@gmail.com >> Skype: nvsonha >> _______________________________________________ >> Ryu-devel mailing list >> Ryu-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/ryu-devel >> > _______________________________________________ > Ryu-devel mailing list > Ryu-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/ryu-devel > <https://www.avast.com/en-in/recommend?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=default3&tag=d9c663a6-a170-4bc5-9014-0914d2d8eaac> I’m protected online with Avast Free Antivirus. Get it here — it’s free forever. <https://www.avast.com/en-in/recommend?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=default3&tag=d9c663a6-a170-4bc5-9014-0914d2d8eaac> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
_______________________________________________ Ryu-devel mailing list Ryu-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ryu-devel