/freebsd-src/tools/sched/ |
H A D | schedgraph.py | 138 def __init__(self, table): argument 139 self.table = table 140 self.map = {} 142 self.map[entry[0]] = entry[1] 144 def lookup(self, name): argument 146 color = self.map[name] 150 self.map[name] = color 151 self.table.append((name, color)) 170 def __init__(self, master, target): argument 171 Frame.__init__(self, master) [all …]
|
/freebsd-src/sys/contrib/openzfs/contrib/pyzfs/libzfs_core/test/ |
H A D | test_nvlist.py | 37 def _dict_to_nvlist_to_dict(self, props): argument 44 def _assertIntDictsEqual(self, dict1, dict2): argument 45 self.assertEqual( 49 self.assertEqual(int(dict1[key]), int(dict2[key])) 51 def _assertIntArrayDictsEqual(self, dict1, dict2): argument 52 self.assertEqual( 58 self.assertEqual( 61 self.assertEqual(int(x), int(y)) 63 def test_empty(self): argument 64 res = self._dict_to_nvlist_to_dict({}) [all …]
|
H A D | test_libzfs_core.py | 305 def setUp(self): argument 308 def tearDown(self): argument 312 def assertExists(self, name): argument 313 self.assertTrue( 316 def assertNotExists(self, name): argument 317 self.assertFalse( 320 def test_exists(self): argument 321 self.assertExists(ZFSTest.pool.makeName()) 323 def test_exists_in_ro_pool(self): argument 324 self.assertExists(ZFSTest.readonly_pool.makeName()) [all …]
|
/freebsd-src/contrib/llvm-project/lldb/bindings/python/ |
H A D | python-extensions.swig | 3 def __eq__(self, rhs): 4 if not isinstance(rhs, type(self)): 7 return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs) 9 def __ne__(self, rhs): 10 if not isinstance(rhs, type(self)): 13 return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs) 19 def __eq__(self, rhs): 20 if not isinstance(rhs, type(self)): 23 return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs) 25 def __ne__(self, rhs): [all …]
|
/freebsd-src/tools/tools/shlib-compat/ |
H A D | shlib-compat.py | 56 def init(self, outname): argument 58 self.out = open(outname, "w") 86 def __init__(self): argument 87 self.exclude = [] 88 self.include = [] 90 def compile(self): argument 91 self.re_exclude = [ re.compile(x) for x in self.exclude ] 92 self.re_include = [ re.compile(x) for x in self.include ] 94 def match(self, s): argument 95 if len(self.re_include): [all …]
|
/freebsd-src/sys/contrib/openzfs/contrib/pyzfs/libzfs_core/ |
H A D | exceptions.py | 43 def __str__(self): argument 44 if self.name is not None: 46 self.errno, self.message, self.name) 48 return "[Errno %d] %s" % (self.errno, self.message) 50 def __repr__(self): argument 52 self.__class__.__name__, self.errno, self.message) 57 def __init__(self, errno, name, message): argument 58 self.errno = errno 59 self.message = message 60 self.name = name [all …]
|
/freebsd-src/contrib/lib9p/pytest/ |
H A D | p9conn.py | 59 def __init__(self, client, op, msg, etype, errno): argument 60 self.client = str(client) 61 self.op = op 62 self.msg = msg 63 self.etype = etype # 'Rerror' or 'Rlerror' 64 self.errno = errno # may be None 65 self.message = self._get_message() 66 super(RemoteError, self).__init__(self, self.message) 68 def __repr__(self): argument 70 '{5})'.format(self.__class__.__name__, self.client, self.op, [all …]
|
/freebsd-src/tests/atf_python/sys/netlink/ |
H A D | attrs.py | 12 def __init__(self, nla_type, data): argument 14 self._nla_type = nla_type.value 15 self._enum = nla_type 17 self._nla_type = nla_type 18 self._enum = None 19 self.nla_list = [] 20 self._data = data 23 def nla_type(self): argument 24 return self._nla_type & 0x3FFF 27 def nla_len(self): argument [all …]
|
H A D | netlink.py | 82 def __init__(self): argument 83 self._pmap = {} 84 self._af_cls = self.get_af_cls() 85 self._seq_counter = 1 86 self.pid = os.getpid() 88 def get_seq(self): argument 89 ret = self._seq_counter 90 self._seq_counter += 1 93 def get_af_cls(self): argument 100 def get_propmap(self, cls): argument [all …]
|
H A D | message.py | 36 def __init__(self, helper, nlmsg_type): argument 37 self.nlmsg_type = enum_or_int(nlmsg_type) 38 self.nla_list = [] 39 self._orig_data = None 40 self.helper = helper 41 self.nl_hdr = Nlmsghdr( 42 nlmsg_type=self.nlmsg_type, nlmsg_seq=helper.get_seq(), nlmsg_pid=helper.pid 44 self.base_hdr = None 46 def set_request(self, need_ack=True): argument 47 self.add_nlflags([NlmBaseFlags.NLM_F_REQUEST]) [all …]
|
/freebsd-src/sys/contrib/openzfs/tests/test-runner/bin/ |
H A D | test-runner.py.in | 75 def __init__(self): argument 76 self.starttime = None 77 self.returncode = None 78 self.runtime = '' 79 self.stdout = [] 80 self.stderr = [] 81 self.kmemleak = '' 82 self.result = '' 84 def done(self, proc, killed, reran): argument 89 m, s = divmod(monotonic_time() - self 116 __init__(self, stream, debug=False) global() argument 122 fileno(self) global() argument 125 read(self, drain=0) global() argument 133 _read(self) global() argument 161 __init__(self, pathname, identifier=None, outputdir=None, timeout=None, user=None, tags=None) global() argument 178 __str__(self) global() argument 187 kill_cmd(self, proc, options, kmemleak, keyboard_interrupt=False) global() argument 220 update_cmd_privs(self, cmd, user) global() argument 244 collect_output(self, proc, debug=False) global() argument 263 run(self, options, dryrun=None, kmemleak=None) global() argument 333 skip(self) global() argument 346 log(self, options, suppress_console=False) global() argument 409 __init__(self, pathname, pre=None, pre_user=None, post=None, post_user=None, failsafe=None, failsafe_user=None, tags=None, **kwargs) global() argument 421 __str__(self) global() argument 443 verify(self) global() argument 465 run(self, options, dryrun=None, kmemleak=None) global() argument 509 __init__(self, pathname, tests=None, **kwargs) global() argument 513 __str__(self) global() argument 536 filter(self, keeplist) global() argument 539 verify(self) global() argument 586 run(self, options, dryrun=None, kmemleak=None) global() argument 635 __init__(self, options) global() argument 657 __str__(self) global() argument 667 addtest(self, pathname, options) global() argument 680 addtestgroup(self, dirname, filenames, options) global() argument 701 filter(self, keeplist) global() argument 719 read(self, options) global() argument 790 write(self, options) global() argument 825 complete_outputdirs(self) global() argument 857 setup_logging(self, options) global() argument 877 run(self, options) global() argument 907 summary(self) global() argument [all...] |
/freebsd-src/contrib/ntp/sntp/libevent/ |
H A D | event_rpcgen.py | 57 def __init__(self, why): # pylint: disable=super-init-not-called argument 58 self.why = why 60 def __str__(self): argument 61 return str(self.why) 66 def __init__(self, name): argument 67 self._name = name 68 self._entries = [] 69 self._tags = {} 72 def AddEntry(self, entry): argument 73 if entry.Tag() in self._tags: [all …]
|
/freebsd-src/contrib/libevent/ |
H A D | event_rpcgen.py | 57 def __init__(self, why): # pylint: disable=super-init-not-called argument 58 self.why = why 60 def __str__(self): argument 61 return str(self.why) 66 def __init__(self, name): argument 67 self._name = name 68 self._entries = [] 69 self._tags = {} 72 def AddEntry(self, entry): argument 73 if entry.Tag() in self._tags: [all …]
|
/freebsd-src/crypto/openssl/util/perl/TLSProxy/ |
H A D | ClientHello.pm | 24 my $self = $class->SUPER::new( 32 $self->{client_version} = 0; 33 $self->{random} = []; 34 $self->{session_id_len} = 0; 35 $self->{session} = ""; 36 $self->{ciphersuite_len} = 0; 37 $self->{ciphersuites} = []; 38 $self->{comp_meth_len} = 0; 39 $self->{comp_meths} = []; 40 $self->{extensions_len} = 0; [all …]
|
H A D | Proxy.pm | 83 my $self = { 113 my $proxaddr = $self->{proxy_addr}; 123 $self->{proxy_sock} = $sock; 124 $self->{proxy_port} = $sock->sockport(); 125 $self->{proxy_addr} = $sock->sockhost(); 126 $self->{proxy_addr} =~ s/(.*:.*)/[$1]/; 128 "$self->{proxy_addr}:$self->{proxy_port}\n"; 130 $self->{server_addr} = $self [all...] |
/freebsd-src/tests/atf_python/sys/netpfil/ipfw/ |
H A D | insns.py | 71 def __init__(self, opcode, is_or, is_not, arg1): argument 73 self.obj_type = opcode.value 74 self._enum = opcode 76 self.obj_type = opcode 77 self._enum = enum_from_int(self.obj_enum_class, self.obj_type) 78 self.is_or = is_or 79 self.is_not = is_not 80 self.arg1 = arg1 81 self.is_action = self.obj_type in insn_actions 82 self.ilen = 1 [all …]
|
H A D | ioctl.py | 57 def __init__(self, obj_type): argument 59 self.obj_type = obj_type.value 60 self._enum = obj_type 62 self.obj_type = obj_type 63 self._enum = enum_from_int(self.obj_enum_class, obj_type) 64 self.obj_list = [] 66 def add_obj(self, obj): argument 67 self.obj_list.append(obj) 70 def len(self): argument 71 return len(bytes(self)) [all …]
|
/freebsd-src/share/mk/ |
H A D | meta2deps.py | 205 def __init__(self, name, conf={}): argument 246 self.name = name 247 self.debug = conf.get('debug', 0) 248 self.debug_out = conf.get('debug_out', sys.stderr) 250 self.machine = conf.get('MACHINE', '') 251 self.machine_arch = conf.get('MACHINE_ARCH', '') 252 self.target_spec = conf.get('TARGET_SPEC', self.machine) 253 self.exts = target_spec_exts(self.target_spec) 254 self.curdir = conf.get('CURDIR') 255 self.reldir = conf.get('RELDIR') [all …]
|
/freebsd-src/contrib/bmake/mk/ |
H A D | meta2deps.py | 205 def __init__(self, name, conf={}): argument 246 self.name = name 247 self.debug = conf.get('debug', 0) 248 self.debug_out = conf.get('debug_out', sys.stderr) 250 self.machine = conf.get('MACHINE', '') 251 self.machine_arch = conf.get('MACHINE_ARCH', '') 252 self.target_spec = conf.get('TARGET_SPEC', self.machine) 253 self.exts = target_spec_exts(self.target_spec) 254 self.curdir = conf.get('CURDIR') 255 self.reldir = conf.get('RELDIR') [all …]
|
/freebsd-src/tests/atf_python/sys/net/ |
H A D | vnet.py | 52 def __init__(self, iface_alias: str, iface_name: str): argument 53 self.name = iface_name 54 self.alias = iface_alias 55 self.vnet_name = "" 56 self.jailed = False 57 self.addr_map: Dict[str, Dict] = {"inet6": {}, "inet": {}} 58 self.prefixes4: List[List[str]] = [] 59 self.prefixes6: List[List[str]] = [] 61 self.iftype = self 66 ifindex(self) global() argument 70 first_ipv6(self) global() argument 75 first_ipv4(self) global() argument 79 set_vnet(self, vnet_name: str) global() argument 82 set_jailed(self, jailed: bool) global() argument 85 run_cmd(self, cmd, verbose=False) global() argument 107 setup_addr(self, _addr: str) global() argument 121 delete_addr(self, _addr: str) global() argument 132 turn_up(self) global() argument 136 enable_ipv6(self) global() argument 140 has_tentative(self) global() argument 154 __init__(self) global() argument 157 _register_iface(self, iface_name: str) global() argument 161 _list_ifaces(self) global() argument 171 create_iface(self, alias_name: str, iface_name: str) global() argument 185 cleanup_vnet_interfaces(self, vnet_name: str) global() argument 199 cleanup(self) global() argument 208 __init__( self, vnet_alias: str, vnet_name: str, jid: int, ifaces: List[VnetInterface] ) global() argument 228 run_vnet_cmd(self, cmd, verbose=True) global() argument 233 disable_dad(self) global() argument 236 set_pipe(self, pipe) global() argument 239 set_subprocess(self, p) global() argument 248 attach(self) global() argument 256 __init__(self, topology_id: str) global() argument 261 _register_vnet(self, vnet_name: str) global() argument 281 create_vnet(self, vnet_alias: str, ifaces: List[VnetInterface]) global() argument 309 cleanup(self) global() argument 337 _get_vnet_handler(self, vnet_alias: str) global() argument 341 _setup_vnet(self, vnet: VnetInstance, obj_map: Dict, pipe) global() argument 384 _get_topo_ifmap(self, topo: Dict) global() argument 401 setup_topology(self, topo: Dict, topology_id: str) global() argument 451 setup_method(self, _method) global() argument 488 cleanup(self, test_id: str) global() argument 497 wait_object(self, pipe, timeout=5) global() argument 502 wait_objects_any(self, pipe_list, timeout=5) global() argument 508 send_object(self, pipe, obj) global() argument 511 wait(self) global() argument 516 curvnet(self) global() argument 525 _setup_default_topology(self) global() argument 538 setup_method(self, method) global() argument [all...] |
/freebsd-src/contrib/ntp/scripts/monitoring/ |
H A D | lr.pl | 45 my $self = shift; 47 $self->{n} = 0; 48 $self->{sx} = 0.0; 49 $self->{sx2} = 0.0; 50 $self->{sxy} = 0.0; 51 $self->{sy} = 0.0; 52 $self->{sy2} = 0.0; 57 my $self = shift; 60 ++($self->{n}); 61 $self->{sx} += $_x; [all …]
|
/freebsd-src/libexec/nuageinit/ |
H A D | yaml.lua | 92 function Parser.new (self, tokens) 93 self.tokens = tokens 94 self.parse_stack = {} 95 self.refs = {} 96 self.current = 0 97 return self 246 Parser.peek = function (self, offset) 248 return self.tokens[offset + self.current] 251 Parser.advance = function (self) [all...] |
/freebsd-src/contrib/llvm-project/lldb/bindings/interface/ |
H A D | SBTypeCategoryExtensions.i | 8 def __eq__(self, other): 9 return not self.__ne__(other) 14 … def __init__(self, sbcategory, get_count_function, get_at_index_function, get_by_name_function): 15 self.sbcategory = sbcategory 16 self.get_count_function = get_count_function 17 self.get_at_index_function = get_at_index_function 18 self.get_by_name_function = get_by_name_function 19 self.regex_type = type(re.compile('.')) 22 def __len__(self): 23 if self.sbcategory and self.get_count_function: [all …]
|
H A D | SBDataExtensions.i | 6 def __len__(self): 7 return self.GetByteSize() 10 def __init__(self, sbdata, readerfunc, item_size): 11 self.sbdata = sbdata 12 self.readerfunc = readerfunc 13 self.item_size = item_size 14 def __getitem__(self,key): 17 for x in range(*key.indices(self.__len__())): 18 list.append(self.__getitem__(x)) 22 key = key * self [all...] |
/freebsd-src/contrib/wpa/wpa_supplicant/examples/p2p/ |
H A D | p2p_connect.py | 78 def __init__(self,ifname,wpas_dbus_interface,addr, argument 81 self.ifname = ifname 82 self.wpas_dbus_interface = wpas_dbus_interface 83 self.wps_method = wps_method 84 self.go_intent = go_intent 85 self.addr = addr 86 self.pin = pin 89 self.wpas_dbus_opath = \ 90 "/" + self.wpas_dbus_interface.replace(".","/") 91 self.wpas_wpas_dbus_interfaces_opath = \ [all …]
|