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

All Samples(9)  |  Call(2)  |  Derive(0)  |  Import(7)
Given the name of a file containing a pickled object, return the pickled
object.

        def readPickled(fn, gzipped=0):
    """Given the name of a file containing a pickled object, return the pickled
       object."""
    f = open(fn, 'rb')
    if gzipped:
        f = gzip.GzipFile(fileobj=f, mode='rb')
    try:
        return cPickle.load(f)
    finally:
        f.close()
        


src/m/i/mixminion-HEAD/lib/mixminion/server/EventStats.py   mixminion(Download)
from time import time
 
from mixminion.Common import formatTime, LOG, previousMidnight, floorDiv, \
     createPrivateDir, MixError, readPickled, tryUnlink, writePickled
 
        NilEventLog.__init__(self)
        if os.path.exists(filename):
            self.__dict__.update(readPickled(filename))
            assert self.count is not None
            assert self.lastRotation is not None

src/m/i/mixminion-HEAD/lib/mixminion/directory/ServerList.py   mixminion(Download)
from mixminion.Crypto import pk_decode_public_key, pk_encode_public_key, \
     pk_same_public_key
from mixminion.Common import IntervalSet, LOG, MixError, MixFatalError, \
     UIError, createPrivateDir, formatBase64, formatDate, formatFnameTime, \
     formatTime, iterFileLines, Lockfile, openUnique, previousMidnight, readFile,\

src/m/i/mixminion-HEAD/lib/mixminion/ClientDirectory.py   mixminion(Download)
import mixminion.ServerInfo
 
from mixminion.Common import LOG, MixError, MixFatalError, UIError, \
     ceilDiv, createPrivateDir, formatDate, formatFnameTime, openUnique, \
     previousMidnight, readPickled, readPossiblyGzippedFile, \
 
    try:
        store = readPickled(cacheFile)
        if isinstance(store, CachingDescriptorSource):
            store.configure(config)

src/m/i/mixminion-HEAD/lib/mixminion/server/Pinger.py   mixminion(Download)
import mixminion.server.MMTPServer
 
from mixminion.Common import MixError, AtomicFile, ceilDiv, createPrivateDir, \
     floorDiv, formatBase64, formatFnameDate, formatTime, IntervalSet, LOG, \
     parseFnameDate, previousMidnight, readPickled, secureDelete, \

src/m/i/mixminion-HEAD/lib/mixminion/server/ServerQueue.py   mixminion(Download)
import mixminion.Filestore
 
from mixminion.Common import MixError, MixFatalError, secureDelete, LOG, \
     createPrivateDir, readPickled, writePickled, formatTime, readFile, \
     ceilDiv

src/m/i/mixminion-HEAD/lib/mixminion/directory/Directory.py   mixminion(Download)
import mixminion.Crypto
 
from mixminion.Common import LOG, MixError, MixFatalError, UIError, \
     formatBase64, iterFileLines, writePickled, readPickled, formatTime
 

src/m/i/mixminion-HEAD/lib/mixminion/directory/ServerInbox.py   mixminion(Download)
import os
 
from mixminion.Common import LOG, MixError, MixFatalError, UIError, \
     formatBase64, readPickled, tryUnlink, writePickled
from mixminion.ServerInfo import ServerInfo