I
iMath
where to view open() function's C implementation source code ?
iMath said:where to view open() function's C implementation source code ?
where to view open() function's C implementation source code ?
iMath said:Â� 2012”N12ŒŽ18“�Â�Š�“�UTC+8‰�Œ�1æ—¶35分58秒,Roy Smith写é“:
but which python module is open() in ?
I met you half-way, I showed you where the source code is. Now you
need to come the other half and look at the code. Maybe start by
grepping the entire source tree for "open"?
http://www.python.org/download/releases/
Download the source for the version you're interested in.
In Python3.3.0 -- the built in open() appears inOuch, that mightn't be very effective! With some function names, you
could do that. Not so much "open". Still, it'd be a start...
ChrisA
[...]
source code online. For the v3.0.0 version of open():
hg.python.org/cpython/file/bd8afb90ebf2/Modules/_io/_iomodule.c
iMath:
There is no need to download the source. You can browse the
source code online. For the v3.0.0 version of open():
hg.python.org/cpython/file/bd8afb90ebf2/Modules/_io/_iomodule.c
For 2.7.3 I think what you want is the builtin_open() function in
http://hg.python.org/cpython/file/70274d53c1dd/Python/bltinmodule.c
and the file object and open_the_file() function in
http://hg.python.org/cpython/file/70274d53c1dd/Objects/fileobject.c
Hope this helps.
iMath:
There is no need to download the source. You can browse the
source code online. For the v3.0.0 version of open():
hg.python.org/cpython/file/bd8afb90ebf2/Modules/_io/_iomodule.c
For 2.7.3 I think what you want is the builtin_open() function in
http://hg.python.org/cpython/file/70274d53c1dd/Python/bltinmodule.c
and the file object and open_the_file() function in
http://hg.python.org/cpython/file/70274d53c1dd/Objects/fileobject.c
Hope this helps.
在 2012å¹´12月19日星期三UTC+8上åˆ4æ—¶57分37秒,[email protected]写é“:
[...]There is no need to download the source. You can browse the
source code online. For the v3.0.0 version of open():
hg.python.org/cpython/file/bd8afb90ebf2/Modules/_io/_iomodule.c
For 2.7.3 I think what you want is the builtin_open() function in
http://hg.python.org/cpython/file/70274d53c1dd/Python/bltinmodule.c
and the file object and open_the_file() function in
http://hg.python.org/cpython/file/70274d53c1dd/Objects/fileobject.c
Hope this helps.
thanks very much !
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.