Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!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.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'scripts': 0.03; '21,': 0.07; 'cc:addr:python-list': 0.11; 'python': 0.11; '.py': 0.16; 'binary,': 0.16; 'binary.': 0.16; 'cached': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'idle.': 0.16; 'nowadays': 0.16; 'subject:python': 0.16; 'files.': 0.16; 'pushed': 0.16; 'ignore': 0.16; 'wrote:': 0.18; 'seems': 0.21; 'separate': 0.22; 'cc:addr:python.org': 0.22; 'creating': 0.23; 'cc:2**0': 0.24; "i've": 0.25; 'compiled': 0.26; 'header:In- Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'went': 0.31; 'easier': 0.31; 'directory,': 0.31; "they'll": 0.31; 'file': 0.32; 'fri,': 0.33; 'noticed': 0.34; 'created': 0.35; 'problem.': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'version': 0.36; 'really': 0.36; 'idle': 0.36; 'should': 0.36; 'files': 0.38; 'anything': 0.39; 'delete': 0.39; 'how': 0.40; 'most': 0.60; 'till': 0.61; 'back': 0.62; 'mar': 0.68; 'discovered': 0.83; 'actually,': 0.84; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=e9zDqt0YEdHgZdIvEWtOKHwsguTjqO5OoitdrmZcNBQ=; b=XbP8ibioz+OeNES2JZ/s4RxH9M7H0pgdppzJVWf+Y78QgB4w/GP8cWYhxM0ZpEy873 cCwONbcvJA4zC66G+L15Sngx/GjHIgdaqOIdgegnVg3YV3vz1S4ei5Gni4hAbAU2cdEt 5B2oWoDqasijDFJ3ff8/pfCbrLX5S9dUb7hIFTlnktmMjPQkD0MXiGoDWe9QR+gTtblC CWO3SYZLYQP5hfraPMvP+QrHv+dxgagr3JuTOpoQCvX5uc3qZTIaxb9ef0s5kMbr7++E G05MUd8oaZvxwniyzntYbtjuIe+4h9EkaVq7RSkmZddxtEVKiKaBs/6ZrLkOBsFWnUVz 7utA== MIME-Version: 1.0 X-Received: by 10.68.201.10 with SMTP id jw10mr48491989pbc.25.1395336595071; Thu, 20 Mar 2014 10:29:55 -0700 (PDT) In-Reply-To: References: Date: Fri, 21 Mar 2014 04:29:54 +1100 Subject: Re: running python 2 vs 3 From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list 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: 30 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1395336598 news.xs4all.nl 2854 [2001:888:2000:d::a6]:49099 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:68589 On Fri, Mar 21, 2014 at 4:23 AM, notbob wrote: > On 2014-03-20, Mark H Harris wrote: > >> not) there really is no problem. The reason is that the .pyc files >> created for python2.x are only used by python2. > > Lordy, what hath I wrought!? ;) > > What the heck is a .pyc file and how are they created? Actually, I > can see it's a compiled binary, but I where did it come from? > > I went back to my ~/python/ dir and noticed one .pyc file out of 15 > .py files I created from following Learning Python the Hard Way. No > one said anything about creating a binary. I know I discovered how to > create/edit python scripts from IDLE. Is that it? I've been using > gedit and emacs up till now. Seems the file with the .pyc file is the > one I edited in IDLE. Is that why LPtHW eschews IDLE for gedit? > > Why do I feel like I've really stepped in it? ;) > You should be able to completely ignore .pyc files, most of the time. The only thing to remember is that you should delete them any time you delete the corresponding .py files. They're a cached version that Python will use to speed up imports, nothing more. Nowadays they'll be pushed away into a separate directory, which makes them easier for you to ignore. This is a good thing. ChrisA