Hi,

How about the following?

$ git diff
diff --git a/ryu/app/simple_switch_13.py b/ryu/app/simple_switch_13.py
index 3e7c598..34881e1 100644
--- a/ryu/app/simple_switch_13.py
+++ b/ryu/app/simple_switch_13.py
@@ -117,3 +117,8 @@ class SimpleSwitch13(app_manager.RyuApp):
         out = parser.OFPPacketOut(datapath=datapath, buffer_id=msg.buffer_id,
                                   in_port=in_port, actions=actions, data=data)
         datapath.send_msg(out)
+
+
+if __name__ == "__main__":
+    from ryu.cmd.manager import main
+    main(["ryu.app.simple_switch_13"])  # specify the path or module name of 
your application(s)


Thanks,
Iwase


On 2017年01月11日 12:02, Juan Francisco Guano wrote:
> Hey everybody
> 
> I wanna know if it is possible Running a ryu app like a python file, how I 
> coding this.
> For example normally run a ryu app like below:
> ryu-manager ryu-app.py
> 
> I wanna run the same app like below:
> python ryu-app.py
> 
> What lines I must add to python file to do this?
> 
> Any suggestiosn?
> 
> Regards.
> 
> 
> ------------------------------------------------------------------------------
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today. http://sdm.link/xeonphi
> 
> 
> 
> _______________________________________________
> Ryu-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
> 

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to