Path: csiph.com!usenet.pasdenom.info!news.franciliens.net!news.muarf.org!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!nerim.net!novso.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.019 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'received:64.202.165': 0.07; 'subject:code': 0.07; 'python': 0.09; 'open()': 0.09; 'dec': 0.15; 'grepping': 0.16; 'roy': 0.16; 'still,': 0.16; 'subject:where': 0.16; 'wed,': 0.16; 'wrote:': 0.17; '>>>': 0.18; 'appears': 0.18; 'module': 0.19; 'code.': 0.20; 'skip:p 30': 0.20; 'subject:skip:i 10': 0.22; 'defined': 0.22; 'header:In-Reply- To:1': 0.25; 'header:User-Agent:1': 0.26; 'am,': 0.27; 'done.': 0.27; 'in.': 0.27; 'tree': 0.27; 'chris': 0.28; '>>>>': 0.29; 'source': 0.29; 'maybe': 0.29; 'that.': 0.30; 'function': 0.30; 'code': 0.31; 'could': 0.32; 'to:addr:python-list': 0.33; 'another': 0.33; 'version': 0.34; 'there': 0.35; 'but': 0.36; 'subject:: ': 0.38; 'object': 0.38; 'some': 0.38; 'to:addr:python.org': 0.39; 'called': 0.39; 'where': 0.40; 'think': 0.40; 'is.': 0.62; 'header:Reply-To:1': 0.68; 'smith': 0.71; 'reply-to:no real name:2**0': 0.72; 'article,': 0.84; "it'd": 0.84; 'subject:source': 0.84; 'lone': 0.91; 'subject:view': 0.91 Date: Tue, 18 Dec 2012 13:09:42 -0800 From: Andrew Robinson User-Agent: Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20111126 Thunderbird/8.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: where to view open() function's C implementation source code ? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: andrew3@r3dsolutions.com List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 21 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1355861508 news.xs4all.nl 6989 [2001:888:2000:d::a6]:55775 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:35068 On 12/18/2012 07:03 AM, Chris Angelico wrote: > On Wed, Dec 19, 2012 at 1:28 AM, Roy Smith wrote: >> In article, >> iMath wrote: >>>> Download the source for the version you're interested in. >>> 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"? > Ouch, 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 In Python3.3.0 -- the built in open() appears in Python-3.3.0/Modules/_io/_iomodule.c; There is another module defined in an object in Python-3.3.0/Modules/_io/fileio.c; but I don't think that the one called when a lone x=open(...) is done. Cheers. --Andrew.