0

I'm intrigued in the low-level programming of Python's source code, and I'm asking how Python actually reads or opens a file. I've been searching through a lot of Python's source code but I can't seem to find the functions/classes that handle the actual byte-by-byte exchange of information between a file and Python. So my question is where those functions/classes are inside the Python folder. Like the actual path of the file so I can look through it.

My apologies if my question is too vague; I can try to further elaborate if you have any questions

I tried looking through the files but I couldn't find anything that seemed to handle the byte by byte exchange of data.

titus 06
  • 1
  • 1
  • The duplicate is a good general answer. For IO specifically, you'll want to look in [`Objects/fileobject.c`](https://github.com/python/cpython/blob/main/Objects/fileobject.c), which defines the lowest level stuff that the `io` module is built on top of. – Blckknght Mar 04 '23 at 17:57

0 Answers0