cycler.py

来自「监控大型网络的软件。能够自动发现拓扑结构」· Python 代码 · 共 16 行

PY
16
字号
class cycler:    def __init__(self, state1, state2):        self.state1 = state1        self.state2 = state2        self.current = state1    def __str__(self):        if self.current == self.state1:            self.current = self.state2        else:            self.current = self.state1        return self.current    def getcurrent(self):        return self.current

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?