I am looking for the source code for python built in function open(),
I've checked the bltinmodule.c but found no open() inside.
Does anyone know where the source of open() is?
Or, how to find it?
Thank you.
1 Answer
With Python on GitHub, have a look at:
3 Comments
kapad
Function names (API level) would be a better reference since the source code changes with time and the line number links would become outdated.
handle
@kapad Feel free to provide this information and I might find the time to update. Of course you can always create your own answer.
kapad
I'm not sure I'll be able to find the correct references. Your answer lacks the function names in the files linked. And the files linked have since changed. Therefore, I don't see the source code for the
open() function when I check those links. For eg: the link for fileutils.c points to a method named _Py_ConvertWCharForm, which I don't think is correct.
Lib/_pyio.py. Depending on what you want, you might also needObjects/fileobject.c