Search Mailing List Archives
[mininet-discuss] Redirect CLI / Logger Output
dcleckley at cigital.com
Thu Apr 10 06:35:29 PDT 2014
Using the API, I would like to be able to call (for example) ping(), which would return the results of the ping command for all hosts. Normally, this output is printed to the console. However, I would like to redirect this output to a text box in my GUI.
I have already set sys.stdout and sys.stderr to my desired location, so currently if I print() any lines, they are correctly output to my GUI window. However, all mininet output still seems to be printing to my console. I dug into the log.py file and didn't find any ways to do any output redirection. I have looked online for this issue, and most people seem to be using python subprocess() to help, but I don't think this applies in this case since I want to call other python functions, not run a separate binary.
Any tips/tricks or other places I should be looking to accomplish some output redirection? Or possibly another way I should be calling the ping() function or other API to return results in a different way?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mininet-discuss