Package DebTorrent :: Module torrentlistparse
[hide private]
[frames] | no frames]

Module torrentlistparse

source code

Parse a file for a list of torrent hashes.

Functions [hide private]
(dictionary, dictionary, dictionary)
parsetorrentlist(filename, parsed)
Parse a file for a list of torrent hashes.
source code
Variables [hide private]
logging.Logger logger = logging.getLogger('DebTorrent.torrentlistparse')
the logger to send all log messages to for this module

Imports: binascii.unhexlify, logging


Function Details [hide private]

parsetorrentlist(filename, parsed)

source code 

Parse a file for a list of torrent hashes.

The format is one hash per line in hex format (40 characters).
Parameters:
  • filename (string) - the file to parse
  • parsed (dictionary) - the cache of all the torrents ever found
Returns: (dictionary, dictionary, dictionary)
the cache of all the torrents found, the new torrents that were found, the torrents that are now missing