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

All Samples(7)  |  Call(0)  |  Derive(0)  |  Import(7)
int(x=0) -> int or long
int(x, base=10) -> int or long

Convert a number or string to an integer, or return 0 if no arguments
are given.  If x is floating point, the conversion truncates towards zero.
If x is outside the integer range, the function returns a long instead.

If x is not a number or if base is given, then x must be a string or
Unicode object representing an integer literal in the given base.  The
literal can be preceded by '+' or '-' and be surrounded by whitespace.(more...)

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
    def exception(self, torrent, text):
        self.error(torrent, CRITICAL, text)
 
    def started(self, torrent):
        pass
        if metainfo.is_trackerless:
            if not self._dht:
                self._error(self, CRITICAL, _("Attempt to download a trackerless torrent with trackerless client turned off."))
                return
            else:
            is_external = True
        elif isinstance(e, BTFailure):
            self._error(CRITICAL, str(e))
            self._activity = ( _("download failed: ") + str(e), 0)
        elif isinstance(e, IOError):
            msg = 'IO Error ' + str(e)
            if e.errno == errno.ENOSPC:
                msg = _("IO Error: No space left on disk, "
                        "or cannot create a file that large:") + str(e)
            self._error(CRITICAL, msg)

src/k/a/kamaelia-HEAD/Sketches/RJL/bittorrent/BitTorrent/bittorrent.py   kamaelia(Download)
assert sys.version_info >= (2, 3), _("Install Python %s or greater") % '2.3'
 
from BitTorrent import BTFailure, INFO, WARNING, ERROR, CRITICAL, status_dict, app_name
 
from BitTorrent import configfile

src/k/a/kamaelia-HEAD/Sketches/RJL/bittorrent/BitTorrent/BitTorrent/TorrentQueue.py   kamaelia(Download)
from BitTorrent.ConvertedMetainfo import ConvertedMetainfo
from BitTorrent.prefs import Preferences
from BitTorrent import BTFailure, BTShutdown, INFO, WARNING, ERROR, CRITICAL
from BitTorrent import configfile
from BitTorrent import FAQ_URL

src/k/a/kamaelia-HEAD/Sketches/RJL/bittorrent/BitTorrent/BitTorrent/IPC.py   kamaelia(Download)
from BitTorrent.RawServer_magic import RawServer, Handler
from BitTorrent.platform import get_home_dir, get_config_dir
from BitTorrent import INFO, WARNING, ERROR, CRITICAL, BTFailure, app_name
 
def toint(s):

src/k/a/kamaelia-HEAD/Sketches/RJL/bittorrent/BitTorrent/BitTorrent/Rerequester.py   kamaelia(Download)
from BitTorrent.btformats import check_peers
from BitTorrent.bencode import bencode, bdecode
from BitTorrent import BTFailure, INFO, WARNING, ERROR, CRITICAL
 
 

src/k/a/kamaelia-HEAD/Sketches/RJL/bittorrent/BitTorrent/BitTorrent/StorageWrapper.py   kamaelia(Download)
 
from BitTorrent.bitfield import Bitfield
from BitTorrent import BTFailure, INFO, WARNING, ERROR, CRITICAL
 
def toint(s):

src/k/a/kamaelia-HEAD/Sketches/RJL/bittorrent/BitTorrent/BitTorrent/RawServer.py   kamaelia(Download)
 
from BitTorrent.platform import bttime
from BitTorrent import WARNING, CRITICAL, FAQ_URL
from BitTorrent.defer import Deferred