picop.cyfileobject#
File-object helpers.
- picop.cyfileobject.file_from_fd(fd, name, mode, buffering, encoding, errors, newline=-1, closefd=1)#
Wrap OS
fdas a Python file viaPyFile_FromFd.Notes
name/mode/ optional codec strings must bebytes, notstr.
- picop.cyfileobject.file_getline(p, n=-1)#
Read a line from file
pviaPyFile_GetLine. :type p:object:param p: :type n:int, default:-1:param n:- Return type:
- picop.cyfileobject.file_write_cstr(s, p)#
Write C string
sto filepviaPyFile_WriteString.Notes
smust bebytes, notstr. Returns0on success; errors raise — do not use the status as a bool. Alias offile_write_string.