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
            filelistfunc = self.open_filelist
        menu_items.append(MenuItem(_("_File list"), func=filelistfunc))
        if self.torrent_state == RUNNING:
            menu_items.append(MenuItem(_("_Peer list"), func=self.open_peerlist))
        ## end Basic Info
        # change save location
        change_save_location_func = None
        if self.torrent_state != RUNNING and self.completion <= 0:
            change_save_location_func = self.change_save_location
        menu_items.append(MenuItem(_("_Change location"),
            #Here's where we'll put the "Start hash check" menu item
            menu_items.append(MenuItem(_("Download _now"), func=self.start))            
        elif self.torrent_state in (RUNNING, RUN_QUEUED):
            # no items for here
            pass
            menu_items.append( MenuItem(_("_Remove" ), func=self.confirm_remove))
        else:
            if self.torrent_state in (RUNNING, RUN_QUEUED):
                menu_items.append(MenuItem(_("Download _later"), func=self.move_to_end))
            else: