Did I find the right examples for you? yes no

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)

src/k/t/ktorrent-HEAD/ktorrent/handlers.py   ktorrent(Download)
from peer import Peer
import math
from util import parse_bitmask, hexlify, decode_peer
 
class BTMessageHandler(object):
            return
        pieces_len = self.request.len
        self.request.connection._remote_bitmask = parse_bitmask(self.request.connection.torrent, self.request.payload)
        self.request.connection._remote_bitmask_incomplete = self.request.connection._remote_bitmask.count(0)
        if options.verbose > 2:

src/k/t/ktorrent-HEAD/ktorrent/connection.py   ktorrent(Download)
from torrent import Torrent
from peer import Peer
from util import MetaStorage, parse_bitmask
from tornado import stack_context
from tornado.options import options
    def post_metadata_received(self):
        # when we get all the metadata then process the bitmask and haves
        if self._stored_bitmask:
            self._remote_bitmask = parse_bitmask(self.torrent, self._stored_bitmask)
            self._stored_bitmask = None