Guido van Rossum | da5b8f2 | 2007-06-12 23:30:11 +0000 | [diff] [blame] | 1 | /* File object interface (what's left of it -- see io.py) */ |
Guido van Rossum | 85a5fbb | 1990-10-14 12:07:46 +0000 | [diff] [blame] | 2 | |
Fred Drake | ea9cb5a | 2000-07-09 00:20:36 +0000 | [diff] [blame] | 3 | #ifndef Py_FILEOBJECT_H |
| 4 | #define Py_FILEOBJECT_H |
| 5 | #ifdef __cplusplus |
| 6 | extern "C" { |
| 7 | #endif |
| 8 | |
Guido van Rossum | da5b8f2 | 2007-06-12 23:30:11 +0000 | [diff] [blame] | 9 | #define PY_STDIOTEXTMODE "b" |
Martin v. Löwis | f6eebbb | 2002-03-15 17:42:16 +0000 | [diff] [blame] | 10 | |
Guido van Rossum | 40d20bc | 2007-10-22 00:09:51 +0000 | [diff] [blame] | 11 | PyAPI_FUNC(PyObject *) PyFile_FromFd(int, char *, char *, int, char *, char *); |
Mark Hammond | 91a681d | 2002-08-12 07:21:58 +0000 | [diff] [blame] | 12 | PyAPI_FUNC(PyObject *) PyFile_GetLine(PyObject *, int); |
| 13 | PyAPI_FUNC(int) PyFile_WriteObject(PyObject *, PyObject *, int); |
Mark Hammond | 91a681d | 2002-08-12 07:21:58 +0000 | [diff] [blame] | 14 | PyAPI_FUNC(int) PyFile_WriteString(const char *, PyObject *); |
| 15 | PyAPI_FUNC(int) PyObject_AsFileDescriptor(PyObject *); |
Guido van Rossum | da5b8f2 | 2007-06-12 23:30:11 +0000 | [diff] [blame] | 16 | PyAPI_FUNC(char *) Py_UniversalNewlineFgets(char *, int, FILE*, PyObject *); |
Guido van Rossum | a330996 | 1993-07-28 09:05:47 +0000 | [diff] [blame] | 17 | |
Mark Hammond | 26cffde | 2001-05-14 12:17:34 +0000 | [diff] [blame] | 18 | /* The default encoding used by the platform file system APIs |
Tim Peters | 058b141 | 2002-04-21 07:29:14 +0000 | [diff] [blame] | 19 | If non-NULL, this is different than the default encoding for strings |
Mark Hammond | 26cffde | 2001-05-14 12:17:34 +0000 | [diff] [blame] | 20 | */ |
Mark Hammond | 91a681d | 2002-08-12 07:21:58 +0000 | [diff] [blame] | 21 | PyAPI_DATA(const char *) Py_FileSystemDefaultEncoding; |
Mark Hammond | 26cffde | 2001-05-14 12:17:34 +0000 | [diff] [blame] | 22 | |
Guido van Rossum | a330996 | 1993-07-28 09:05:47 +0000 | [diff] [blame] | 23 | #ifdef __cplusplus |
| 24 | } |
| 25 | #endif |
| 26 | #endif /* !Py_FILEOBJECT_H */ |