Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(2)  |  Derive(0)  |  Import(1)

src/d/h/DHTBot-HEAD/dhtbot/coding/krpc_coder.py   DHTBot(Download)
        q.target_id = basic_coder.decode_network_id(rpc_dict['a']['info_hash'])
        # Try encoding the port (to ensure it is within range)
        basic_coder.encode_port(rpc_dict['a']['port'])
        q.port = rpc_dict['a']['port']
        q.token = basic_coder.btol(rpc_dict['a']['token'])
        query_dict['a']['token'] = basic_coder.ltob(query.token)
        # Try encoding the port, to see if it is within range
        basic_coder.encode_port(query.port)
        query_dict['a']['port'] = query.port
        query_dict['a']['info_hash'] = (

src/d/h/DHTBot-HEAD/dhtbot/test/coding/test_basic_coder.py   DHTBot(Download)
from twisted.trial import unittest
 
# Functions being tested
from dhtbot.coding.basic_coder import (ltob, btol, encode_address,
        decode_address, encode_port, decode_port, encode_network_id,