PyFileObject

subclass of PyObject Availability: 2.*

Members

Variables

f_binary
int f_binary;

Flag which indicates whether the file is open in binary (1) or text (0) mode

f_buf
char* f_buf;

Allocated readahead buffer

f_bufend
char* f_bufend;

Points after last occupied position

f_bufptr
char* f_bufptr;

Current buffer position

f_close
int function(FILE*) f_close;

_

f_encoding
PyObject* f_encoding;

_

f_errors
PyObject* f_errors;

Availability: >= 2.6

f_fp
FILE* f_fp;

_

f_mode
PyObject* f_mode;

_

f_name
PyObject* f_name;

_

f_newlinetypes
int f_newlinetypes;

Types of newlines seen

f_setbuf
char* f_setbuf;

Buffer for setbuf(3) and setvbuf(3)

f_skipnextlf
int f_skipnextlf;

Skip next \n

f_softspace
int f_softspace;

Flag used by 'print' command

f_univ_newline
int f_univ_newline;

Handle any newline convention

readable
int readable;

Availability: >= 2.6

unlocked_count
int unlocked_count;

Num. currently running sections of code using f_fp with the GIL released. */ /// Availability: >= 2.

weakreflist
PyObject* weakreflist;

List of weak references

writable
int writable;

Availability: >= 2.6

Meta