All Samples(1990) | Call(1868) | Derive(0) | Import(122)
dump(obj, file, protocol=0) -- Write an object in pickle format to the given file. See the Pickler docstring for the meaning of optional argument proto.
src/g/o/google-app-engine-HEAD/lib/webob/docs/comment-example-code/example.py google-app-engine(Download)
import os import urllib import time import re from cPickle import load, dump from webob import Request, Response, html_escape from webob import exc
def save_data(self, url, data):
filename = self.url_filename(url)
f = open(filename, 'wb')
dump(data, f)
f.close()
def url_filename(self, url):
src/g/o/google_appengine-HEAD/lib/webob/docs/comment-example-code/example.py google_appengine(Download)
import os import urllib import time import re from cPickle import load, dump from webob import Request, Response, html_escape from webob import exc
def save_data(self, url, data):
filename = self.url_filename(url)
f = open(filename, 'wb')
dump(data, f)
f.close()
def url_filename(self, url):
src/g/a/gaesdk-python-HEAD/lib/webob/docs/comment-example-code/example.py gaesdk-python(Download)
import os import urllib import time import re from cPickle import load, dump from webob import Request, Response, html_escape from webob import exc
def save_data(self, url, data):
filename = self.url_filename(url)
f = open(filename, 'wb')
dump(data, f)
f.close()
def url_filename(self, url):
src/p/y/PyBrain-0.3/pybrain/tools/example_tools.py PyBrain(Download)
# Author: Frank Sehnke, sehnke@in.tum.de ######################################################################### from cPickle import load, dump from scipy import array, sqrt from pylab import * class ExTools():
def saveWeights(self, filename, w):
filepointer = file(filename, 'w+')
dump(w, filepointer)
filepointer.close()
# Method for saving the weight matrix
def saveResults(self, filename, results):
filepointer = file(filename, 'w+')
dump(results, filepointer)
src/p/r/Products.MimetypesRegistry-2.0.1/Products/MimetypesRegistry/mime_types/smi_mimetypes.py Products.MimetypesRegistry(Download)
import os from stat import ST_MTIME from cPickle import dump, load from xml.sax import parse from xml.sax.handler import ContentHandler
result = parseSMIFile(SMI_FILE)
try:
fd = open(SMI_COMPILED_FILE, 'wb')
dump(result, fd, protocol=2)
fd.close()
except (IOError, OSError):
pass
src/w/e/webnest-HEAD/env/lib/python2.6/site-packages/werkzeug/contrib/cache.py webnest(Download)
from md5 import new as md5
from itertools import izip
from time import time
from cPickle import loads, dumps, load, dump, HIGHEST_PROTOCOL
class BaseCache(object):
try:
f = file(filename, 'wb')
try:
dump(int(time() + timeout), f, 1)
dump(value, f, HIGHEST_PROTOCOL)
finally:
f.close()
src/z/a/zamboni-lib-HEAD/lib/python/werkzeug/contrib/cache.py zamboni-lib(Download)
from md5 import new as md5
from itertools import izip
from time import time
from cPickle import loads, dumps, load, dump, HIGHEST_PROTOCOL
class BaseCache(object):
try:
f = file(filename, 'wb')
try:
dump(int(time() + timeout), f, 1)
dump(value, f, HIGHEST_PROTOCOL)
finally:
f.close()
src/u/l/uliweb-HEAD/uliweb/lib/werkzeug/contrib/cache.py uliweb(Download)
from md5 import new as md5
from itertools import izip
from time import time
from cPickle import loads, dumps, load, dump, HIGHEST_PROTOCOL
have_memcache = True
try:
try:
f = file(filename, 'wb')
try:
dump(int(time() + timeout), f, 1)
dump(value, f, HIGHEST_PROTOCOL)
finally:
f.close()
src/p/y/pythonedinburgh-HEAD/werkzeug/contrib/cache.py pythonedinburgh(Download)
from md5 import new as md5
from itertools import izip
from time import time
from cPickle import loads, dumps, load, dump, HIGHEST_PROTOCOL
class BaseCache(object):
try:
f = file(filename, 'wb')
try:
dump(int(time() + timeout), f, 1)
dump(value, f, HIGHEST_PROTOCOL)
finally:
f.close()
src/u/l/Uliweb-0.0.1a2/uliweb/lib/werkzeug/contrib/cache.py Uliweb(Download)
from md5 import new as md5
from itertools import izip
from time import time
from cPickle import loads, dumps, load, dump, HIGHEST_PROTOCOL
class BaseCache(object):
try:
f = file(filename, 'wb')
try:
dump(int(time() + timeout), f, 1)
dump(value, f, HIGHEST_PROTOCOL)
finally:
f.close()
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 Next