I am reading the source code of pox controller. There is an import
statement in one module called l3_editing.py
which is modified based l3_learning.py
.
The import statement is:
from pox.lib.recoco import Timer
Because I do not know Timer
, I just along with the source tree to find this struct. But I cannot find this struct Timer, which really make me confused. It should be in pox/lib/recoco.py
, but there is no module named recoco.py
under lib
package.
Items below pox/lib:
Items below pox/lib/recoco
:
The lib
directory is a python package. It contains an __init__.py
file . When you import a package this will cause any __init__.py
file to be executed. So what's in there?
Just one line:
from recoco import *
Great we are getting closer! Lets look in recoco.py
:
...
class Timer (Task):
"""
A simple timer.
...
There you have it!
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.