1 """Stubs for the 'sys' module."""
\r
4 IO, NoReturn, Union, List, Sequence, Any, Dict, Tuple, BinaryIO, Optional,
\r
5 Callable, overload, Text, Type,
\r
7 from types import FrameType, ModuleType, TracebackType, ClassType
\r
10 bytes_warning = ... # type: int
\r
11 debug = ... # type: int
\r
12 division_new = ... # type: int
\r
13 division_warning = ... # type: int
\r
14 dont_write_bytecode = ... # type: int
\r
15 hash_randomization = ... # type: int
\r
16 ignore_environment = ... # type: int
\r
17 inspect = ... # type: int
\r
18 interactive = ... # type: int
\r
19 no_site = ... # type: int
\r
20 no_user_site = ... # type: int
\r
21 optimize = ... # type: int
\r
22 py3k_warning = ... # type: int
\r
23 tabcheck = ... # type: int
\r
24 unicode = ... # type: int
\r
25 verbose = ... # type: int
\r
28 max = ... # type: float
\r
29 max_exp = ... # type: int
\r
30 max_10_exp = ... # type: int
\r
31 min = ... # type: float
\r
32 min_exp = ... # type: int
\r
33 min_10_exp = ... # type: int
\r
34 dig = ... # type: int
\r
35 mant_dig = ... # type: int
\r
36 epsilon = ... # type: float
\r
37 radix = ... # type: int
\r
38 rounds = ... # type: int
\r
40 class _version_info(Tuple[int, int, int, str, int]):
\r
44 releaselevel = ... # type: str
\r
47 _mercurial = ... # type: Tuple[str, str, str]
\r
48 api_version = ... # type: int
\r
49 argv = ... # type: List[str]
\r
50 builtin_module_names = ... # type: Tuple[str, ...]
\r
51 byteorder = ... # type: str
\r
52 copyright = ... # type: str
\r
53 dont_write_bytecode = ... # type: bool
\r
54 exec_prefix = ... # type: str
\r
55 executable = ... # type: str
\r
56 flags = ... # type: _flags
\r
57 float_repr_style = ... # type: str
\r
58 hexversion = ... # type: int
\r
59 long_info = ... # type: object
\r
60 maxint = ... # type: int
\r
61 maxsize = ... # type: int
\r
62 maxunicode = ... # type: int
\r
63 modules = ... # type: Dict[str, Any]
\r
64 path = ... # type: List[str]
\r
65 platform = ... # type: str
\r
66 prefix = ... # type: str
\r
67 py3kwarning = ... # type: bool
\r
68 __stderr__ = ... # type: IO[str]
\r
69 __stdin__ = ... # type: IO[str]
\r
70 __stdout__ = ... # type: IO[str]
\r
71 stderr = ... # type: IO[str]
\r
72 stdin = ... # type: IO[str]
\r
73 stdout = ... # type: IO[str]
\r
74 subversion = ... # type: Tuple[str, str, str]
\r
75 version = ... # type: str
\r
76 warnoptions = ... # type: object
\r
77 float_info = ... # type: _float_info
\r
78 version_info = ... # type: _version_info
\r
79 ps1 = ... # type: str
\r
80 ps2 = ... # type: str
\r
81 last_type = ... # type: type
\r
82 last_value = ... # type: BaseException
\r
83 last_traceback = ... # type: TracebackType
\r
84 # TODO precise types
\r
85 meta_path = ... # type: List[Any]
\r
86 path_hooks = ... # type: List[Any]
\r
87 path_importer_cache = ... # type: Dict[str, Any]
\r
88 displayhook = ... # type: Optional[Callable[[int], None]]
\r
89 excepthook = ... # type: Optional[Callable[[type, BaseException, TracebackType], None]]
\r
90 exc_type = ... # type: Optional[type]
\r
91 exc_value = ... # type: Union[BaseException, ClassType]
\r
92 exc_traceback = ... # type: TracebackType
\r
94 class _WindowsVersionType:
\r
95 major = ... # type: Any
\r
96 minor = ... # type: Any
\r
97 build = ... # type: Any
\r
98 platform = ... # type: Any
\r
99 service_pack = ... # type: Any
\r
100 service_pack_major = ... # type: Any
\r
101 service_pack_minor = ... # type: Any
\r
102 suite_mask = ... # type: Any
\r
103 product_type = ... # type: Any
\r
105 def getwindowsversion() -> _WindowsVersionType: ...
\r
107 def _clear_type_cache() -> None: ...
\r
108 def _current_frames() -> Dict[int, FrameType]: ...
\r
109 def _getframe(depth: int = ...) -> FrameType: ...
\r
110 def call_tracing(fn: Any, args: Any) -> Any: ...
\r
111 def __displayhook__(value: int) -> None: ...
\r
112 def __excepthook__(type_: type, value: BaseException, traceback: TracebackType) -> None: ...
\r
113 def exc_clear() -> None:
\r
114 raise DeprecationWarning()
\r
115 # TODO should be a union of tuple, see mypy#1178
\r
116 def exc_info() -> Tuple[Optional[Type[BaseException]],
\r
117 Optional[BaseException],
\r
118 Optional[TracebackType]]: ...
\r
120 # sys.exit() accepts an optional argument of anything printable
\r
121 def exit(arg: Any = ...) -> NoReturn:
\r
123 def getcheckinterval() -> int: ... # deprecated
\r
124 def getdefaultencoding() -> str: ...
\r
125 def getdlopenflags() -> int: ...
\r
126 def getfilesystemencoding() -> str: ... # In practice, never returns None
\r
127 def getrefcount(arg: Any) -> int: ...
\r
128 def getrecursionlimit() -> int: ...
\r
129 def getsizeof(obj: object, default: int = ...) -> int: ...
\r
130 def getprofile() -> Optional[Any]: ...
\r
131 def gettrace() -> Optional[Any]: ...
\r
132 def setcheckinterval(interval: int) -> None: ... # deprecated
\r
133 def setdlopenflags(n: int) -> None: ...
\r
134 def setdefaultencoding(encoding: Text) -> None: ... # only exists after reload(sys)
\r
135 def setprofile(profilefunc: Any) -> None: ... # TODO type
\r
136 def setrecursionlimit(limit: int) -> None: ...
\r
137 def settrace(tracefunc: Any) -> None: ... # TODO type
\r