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

All Samples(96)  |  Call(61)  |  Derive(0)  |  Import(35)

src/k/a/kamaelia-HEAD/Sketches/RJL/bittorrent/BitTorrent/bittorrent-console.py   kamaelia(Download)
from BitTorrent.prefs import Preferences
from BitTorrent import configfile
from BitTorrent import BTFailure
from BitTorrent import version
from BitTorrent import GetTorrent
            metainfo, errors = GetTorrent.get( self.torrentfilename )
            if errors:
                raise BTFailure(_("Error reading .torrent file: ") + '\n'.join(errors))
            else:
                self.dl = DLKamaelia(metainfo, config, self)
            if self.config['save_as']:
                if self.config['save_in']:
                    raise BTFailure(_("You cannot specify both --save_as and "
                                      "--save_in"))
                saveas = self.config['save_as']

src/k/a/kamaelia-HEAD/Sketches/RJL/bittorrent/BitTorrent/BitTorrent/makemetafile.py   kamaelia(Download)
from BitTorrent.parseargs import parseargs, printHelp
from BitTorrent.obsoletepythonsupport import *
from BitTorrent import BTFailure
 
from khashmir.node import Node
                    data_dir = None):
    if len(files) > 1 and target:
        raise BTFailure(_("You can't specify the name of the .torrent file "
                          "when generating multiple torrents at once"))
 
        'a1'.decode(filesystem_encoding)
    except:
        raise BTFailure(_('Filesystem encoding "%s" is not supported in this version')
                        % filesystem_encoding)
    files.sort()
    def to_utf8(name):
        try:
            u = name.decode(encoding)
        except Exception, e:
            raise BTFailure(_('Could not convert file/directory name "%s" to '
                              'utf-8 (%s). Either the assumed filesystem '
                              'encoding "%s" is wrong or the filename contains '
                              'illegal bytes.') % (name, str(e), encoding))
        if u.translate(noncharacter_translate) != u:
            raise BTFailure(_('File/directory name "%s" contains reserved '

src/k/a/kamaelia-HEAD/Sketches/RJL/bittorrent/BitTorrent/launchmany-curses.py   kamaelia(Download)
from BitTorrent import configfile
from BitTorrent import version
from BitTorrent import BTFailure
 
try:
            config['torrent_dir'] = args[0]
        if not os.path.isdir(config['torrent_dir']):
            raise BTFailure(_("Warning: ")+args[0]+_(" is not a directory"))
    except BTFailure, e:
        print _("error: ") + str(e) + _("\nrun with no args for parameter explanations")

src/k/a/kamaelia-HEAD/Sketches/RJL/bittorrent/BitTorrent/launchmany-console.py   kamaelia(Download)
from BitTorrent import configfile
from BitTorrent import version
from BitTorrent import BTFailure
 
exceptions = []
            config['torrent_dir'] = args[0]
        if not os.path.isdir(config['torrent_dir']):
            raise BTFailure(_("Warning: ")+args[0]+_(" is not a directory"))
    except BTFailure, e:
        print _("error: %s\nrun with no args for parameter explanations") % str(e) 

src/k/a/kamaelia-HEAD/Sketches/RJL/bittorrent/BitTorrent/BitTorrent/RawServer_magic.py   kamaelia(Download)
magic = BaseMagic()    
 
from BitTorrent import BTFailure
 
try:
def switch_rawserver(choice):
    if magic.too_late:
        raise BTFailure(_("Too late to switch RawServer backends, %s has already been used.") % str(magic.base))
 
    if choice.lower() == 'twisted':

src/k/a/kamaelia-HEAD/Sketches/RJL/Packages/Kamaelia/Community/RJL/Kamaelia/Protocol/Torrent/TorrentClient.py   kamaelia(Download)
from BitTorrent.prefs import Preferences
from BitTorrent import configfile
from BitTorrent import BTFailure
from BitTorrent import version
from BitTorrent import console, stderr_console

src/k/a/kamaelia-HEAD/Sketches/RJL/Kamaelia/Community/RJL/Kamaelia/Protocol/Torrent/TorrentClient.py   kamaelia(Download)
from BitTorrent.prefs import Preferences
from BitTorrent import configfile
from BitTorrent import BTFailure
from BitTorrent import version
from BitTorrent import console, stderr_console

src/k/a/kamaelia-HEAD/Sketches/RJL/bittorrent/BitTorrent/BitTorrent/download.py   kamaelia(Download)
from BitTorrent.ConvertedMetainfo import set_filesystem_encoding
from BitTorrent import version
from BitTorrent import BTFailure, BTShutdown, INFO, WARNING, ERROR, CRITICAL
 
from khashmir.utkhashmir import UTKhashmir

src/k/a/kamaelia-HEAD/Sketches/RJL/bittorrent/BitTorrent/BitTorrent/Encoder.py   kamaelia(Download)
from socket import error as socketerror
 
from BitTorrent import BTFailure
from BitTorrent.RawServer_magic import Handler
from BitTorrent.NatTraversal import UPNPError
    def add_torrent(self, infohash, encoder):
        if infohash in self.torrents:
            raise BTFailure(_("Can't start two separate instances of the same "
                              "torrent"))
        self.torrents[infohash] = encoder

src/k/a/kamaelia-HEAD/Sketches/RJL/bittorrent/BitTorrent/BitTorrent/btformats.py   kamaelia(Download)
import re
 
from BitTorrent import BTFailure
 
allowed_path_re = re.compile(r'^[^/\\.~][^/\\]*$')
                        raise BTFailure, _("bad metainfo - duplicate path")
                    elif name2[len(name1)] == '/':
                        raise BTFailure(_("bad metainfo - name used as both"
                                          "file and subdirectory name"))
        except StopIteration:

Previous  1 | 2 | 3 | 4  Next