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

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

        def make_meta_file(file, url, piece_len_exp, 
        flag = Event(), progress = dummy, progress_percent=1, comment = None, target = None):
    piece_length = 2 ** piece_len_exp
    a, b = split(file)
    if not target:
        if b == '':
            f = a + '.torrent'
            f = join(a, b + '.torrent')
        f = target
    info = makeinfo(file, piece_length, flag, progress, progress_percent)
    if flag.isSet():
    h = open(f, 'wb')
    data = {'info': info, 'announce': strip(url), 'creation date': long(time())}
    if comment:
        data['comment'] = comment

src/b/e/benflix-HEAD/videoportal/models.py   benflix(Download)
from threading import Event
from BitTorrent.btmakemetafile import calcsize, make_meta_file, ignore
    def create_bittorrent(self):
        ''' This is where the bittorrent files are created and transmission is controlled'''
        flag = Event()
        make_meta_file(str(self.originalFile.path), settings.BITTORRENT_TRACKER_ANNOUNCE_URL, flag = flag, progress_percent=0, piece_len_exp = 18, target = settings.BITTORRENT_FILES_DIR + self.slug + '.torrent')
        self.torrentURL = settings.BITTORRENT_FILES_BASE_URL + self.slug + '.torrent'

src/b/e/benflix-HEAD/videoportal/views.py   benflix(Download)
import appsettings as settings
from BitTorrent.btmakemetafile import calcsize, make_meta_file, ignore
import djangotasks