# Stubs for tempfile # Ron Murawski # based on http://docs.python.org/3.3/library/tempfile.html # Adapted for Python 2.7 by Michal Pokorny from typing import Tuple, IO # global variables tempdir = ... # type: str template = ... # type: str # TODO text files # function stubs def TemporaryFile( mode: str = ..., bufsize: int = ..., suffix: str = ..., prefix: str = ..., dir: str = ...) -> IO[str]: ... def NamedTemporaryFile( mode: str = ..., bufsize: int = ..., suffix: str = ..., prefix: str = ..., dir: str = ..., delete: bool = ... ) -> IO[str]: ... def SpooledTemporaryFile( max_size: int = ..., mode: str = ..., buffering: int = ..., suffix: str = ..., prefix: str = ..., dir: str = ...) -> IO[str]: ... class TemporaryDirectory: name = ... # type: str def __init__(self, suffix: str = ..., prefix: str = ..., dir: str = ...) -> None: ... def cleanup(self) -> None: ... def __enter__(self) -> str: ... def __exit__(self, type, value, traceback) -> bool: ... def mkstemp(suffix: str = ..., prefix: str = ..., dir: str = ..., text: bool = ...) -> Tuple[int, str]: ... def mkdtemp(suffix: str = ..., prefix: str = ..., dir: str = ...) -> str: ... def mktemp(suffix: str = ..., prefix: str = ..., dir: str = ...) -> str: ... def gettempdir() -> str: ... def gettempprefix() -> str: ...