我想在Python上运行iperf。请指导

时间:2019-05-30 09:39:23

标签: python iperf

import collections
import glob
import json
import os
import re
import sys

class Iperf(object):

    def __init__(self, runner=None, bind=None):
        self.run = runner
        self.bind = bind

    def Ping(self,host):
        args = ['-c', '1', host]
        return (self.run(['ping'] + args).succeeded or self.run(['ping6'] + args).succeeded)

链接:https://gfiber.googlesource.com/vendor/google/test/+/master/wifitables/iperf.py

0 个答案:

没有答案