All Samples(4) | Call(0) | Derive(1) | Import(3)
Temporary file wrapper This class provides a wrapper around files opened for temporary use. In particular, it seeks to automatically remove the file when it is no longer needed.
src/p/l/plone.app.blob-1.3/src/plone/app/blob/monkey.py plone.app.blob(Download)
# ZPublisher gets monkey-patched to use an extended version of the # cgi module's FieldStorage class, so that temporary files used during # file uploads are not anonymous, but instead provide a file name that # can later be used with the blob class' `consumeFile` method... from ZPublisher import HTTPRequest from tempfile import mkstemp, _TemporaryFileWrapper as TFW from cgi import FieldStorage from os.path import isfile from os import unlink, fdopen class TemporaryFileWrapper(TFW):
src/j/a/jah-HEAD/trunk/lib/jah/store/file.py jah(Download)
import platform
from os.path import exists
from jah.utils.encoding import smart_file_str
from tempfile import NamedTemporaryFile, _TemporaryFileWrapper
if platform.system() == 'Windows':
import win32con, win32file, pywintypes # http://sf.net/projects/pywin32/
on_windows = True
src/j/a/jah-HEAD/lib/jah/store/file.py jah(Download)
import platform
from os.path import exists
from jah.utils.encoding import smart_file_str
from tempfile import NamedTemporaryFile, _TemporaryFileWrapper
if platform.system() == 'Windows':
import win32con, win32file, pywintypes # http://sf.net/projects/pywin32/
on_windows = True