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

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

        def set_filesystem_encoding(encoding):
    global filesystem_encoding
    filesystem_encoding = 'ascii'
    if encoding == '':
        try:
            sys.getfilesystemencoding
        except AttributeError:
            log.warning("This seems to be an old Python version which does not support detecting the filesystem encoding. Assuming 'ascii'.")
            return
        encoding = sys.getfilesystemencoding()
        if encoding is None:
            log.warning("Python failed to autodetect filesystem encoding. Using 'ascii' instead.")
            return
    try:
        'a1'.decode(encoding)
    except:
        log.error("Filesystem encoding '"+encoding+"' is not supported. Using 'ascii' instead.")
        return
    filesystem_encoding = encoding
        


src/a/n/Anomos-HEAD/Anomos/download.py   Anomos(Download)
 
from Anomos.Choker import Choker
from Anomos.ConvertedMetainfo import set_filesystem_encoding
from Anomos.Measure import Measure
from Anomos.Downloader import Downloader
        self.nbr_mngrs = {}
        self.torrents = {}
        set_filesystem_encoding(config['filesystem_encoding'])
        self.listen_fail_ok = listen_fail_ok