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

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

src/k/a/kamaelia-HEAD/Sketches/RJL/bittorrent/BitTorrent/bittorrent.py   kamaelia(Download)
 
from BitTorrent.parseargs import makeHelp
from BitTorrent.TorrentQueue import RUNNING, RUN_QUEUED, QUEUED, KNOWN, ASKING_LOCATION
from BitTorrent.TrayIcon import TrayIcon
from BitTorrent.StatusLight import GtkStatusLight as StatusLight
 
        ## Queue state dependent items
        if self.torrent_state == KNOWN:
            menu_items.append( MenuItem(_("Re_start"), func=self.move_to_end   ))
        elif self.torrent_state == QUEUED:
        ## Completion dependent items
        if self.completion is not None and self.completion >= 1:
            if self.torrent_state != KNOWN:
                menu_items.append(MenuItem(_("_Finish"), func=self.finish))
            menu_items.append( MenuItem(_("_Remove" ), func=self.confirm_remove))
class KnownTorrentBox(TorrentBox):
 
    torrent_state = KNOWN
 
    def __init__(self, infohash, metainfo, dlpath, completion, main):
    def finish(self, widget):
        self.main.change_torrent_state(self.infohash, KNOWN)
 
 
class PausedTorrentBox(DroppableTorrentBox):