Re: where to view open() function's C implementation source code �

iMath redstone-cold at 163.com
Tue Dec 18 18:55:05 EST 2012


在 2012年12月19日星期三UTC+8上午4时57分37秒,ru... at yahoo.com写道:
> On Monday, December 17, 2012 10:35:58 PM UTC-7, Roy Smith wrote:
> 
> > iMath <redstone-cold at 163.com> wrote:
> 
> > > where to view  open() function's C implementation source code ?
> 
> > http://www.python.org/download/releases/
> 
> > Download the source for the version you're interested in.
> 
> 
> 
> 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.

thanks very much !



More information about the Python-list mailing list