Lines Matching defs:file

78     PyObject *file;
88 PyObject *file;
107 PyObject *file;
143 /* Get the file descriptor of a file by calling its fileno() method and then
146 If file is NULL or Py_None, use sys.stderr as the new file.
147 If file is an integer, it will be treated as file descriptor.
149 On success, return the file descriptor and write the new file into *file_ptr.
158 PyObject *file = *file_ptr;
160 if (file == NULL || file == Py_None) {
162 file = _PySys_GetAttr(tstate, &_Py_ID(stderr));
163 if (file == NULL) {
167 if (file == Py_None) {
172 else if (PyLong_Check(file)) {
173 fd = _PyLong_AsInt(file);
178 "file is not a valid file descripter");
185 result = PyObject_CallMethodNoArgs(file, &_Py_ID(fileno));
199 "file.fileno() is not a valid file descriptor");
203 result = PyObject_CallMethodNoArgs(file, &_Py_ID(flush));
210 *file_ptr = file;
266 static char *kwlist[] = {"file", "all_threads", NULL};
267 PyObject *file = NULL;
275 &file, &all_threads))
278 fd = faulthandler_get_fileno(&file);
543 static char *kwlist[] = {"file", "all_threads", NULL};
544 PyObject *file = NULL;
550 "|Oi:enable", kwlist, &file, &all_threads))
553 fd = faulthandler_get_fileno(&file);
561 Py_XINCREF(file);
562 Py_XSETREF(fatal_error.file, file);
591 Py_CLEAR(fatal_error.file);
665 Py_CLEAR(thread.file);
706 static char *kwlist[] = {"timeout", "repeat", "file", "exit", NULL};
710 PyObject *file = NULL;
719 &timeout_obj, &repeat, &file, &exit))
743 fd = faulthandler_get_fileno(&file);
775 Py_XINCREF(file);
776 Py_XSETREF(thread.file, file);
791 Py_CLEAR(thread.file);
908 static char *kwlist[] = {"signum", "file", "all_threads", "chain", NULL};
910 PyObject *file = NULL;
921 &signum, &file, &all_threads, &chain))
931 fd = faulthandler_get_fileno(&file);
958 Py_XINCREF(file);
959 Py_XSETREF(user->file, file);
980 Py_CLEAR(user->file);
1213 Py_VISIT(thread.file);
1217 Py_VISIT(user_signals[signum].file);
1220 Py_VISIT(fatal_error.file);
1243 PyDoc_STR("enable(file=sys.stderr, all_threads=True): "
1251 PyDoc_STR("dump_traceback(file=sys.stderr, all_threads=True): "
1253 "if all_threads is True, into file")},
1256 PyDoc_STR("dump_traceback_later(timeout, repeat=False, file=sys.stderrn, exit=False):\n"
1267 PyDoc_STR("register(signum, file=sys.stderr, all_threads=True, chain=False): "
1270 "all_threads is True, into file")},