Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!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.072 X-Spam-Evidence: '*H*': 0.86; '*S*': 0.00; 'source,': 0.04; 'screen.': 0.09; 'subject:script': 0.09; 'python': 0.11; 'displaying': 0.16; 'extension,': 0.16; 'naming': 0.16; 'script,': 0.16; 'wrote:': 0.18; 'all,': 0.19; 'file,': 0.19; 'code,': 0.22; 'shell': 0.22; 'header:User-Agent:1': 0.23; "shouldn't": 0.24; 'source': 0.25; 'header:In-Reply-To:1': 0.27; 'appreciated.': 0.29; 'am,': 0.29; "i'm": 0.30; 'code': 0.31; 'easier': 0.31; 'explained': 0.31; 'file': 0.32; 'text': 0.33; 'guess': 0.33; 'plain': 0.33; 'basic': 0.35; 'shows': 0.36; 'question,': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'how': 0.40; 'read': 0.60; 'new': 0.61; 'save': 0.62; 'received:74.208': 0.68; 'therefore': 0.72; 'url:i': 0.72; 'url:jpg': 0.83; 'happening?': 0.84; 'presumably': 0.84; 'received:74.208.4.194': 0.84; 'url:imgur': 0.84; 'convinced': 0.93 Date: Mon, 08 Apr 2013 06:55:05 -0400 From: Dave Angel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Displaying colours in saved script References: <6899601e-4a24-4ef1-b848-864e471739eb@googlegroups.com> In-Reply-To: <6899601e-4a24-4ef1-b848-864e471739eb@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:z2s8j3IWf5vIZHdepOJWr4yz3+bkZdT0zNTr5bOFtxL nFlz6+f4sUgxREM3+Y8fZRCRMBzIyLV2ifDSheR50Yk+EqELzp UuMDst1i27xGh+nnW16RefFQpY1V0EY9frnw5XV+1aGiEBxIMT rg1mgqE30emeXF0VwxvkyCiKxEoc2obRM3ac7JAYHn6fk4ymbp JVMnNMFXnbz2PhyzhtdrAkdjVWXwclnh70yhQZe9c/wzLm3COP RUR6TrybLnkehwnV9Meljv9YgBFAkvANEuC9aH5G+F9NsADsc3 7OotrSemx2hJW/zu6AzyxZW/bgT0yObaGLtogSiabuuuZOiew= = 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: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1365418523 news.xs4all.nl 6970 [2001:888:2000:d::a6]:43277 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:43058 On 04/08/2013 06:32 AM, Casperb wrote: > Hi all, > > I'm new to Python and have a pretty basic question, explained in the following screendump: > > http://i.imgur.com/oaCuKp5.jpg > > After I save my script, the nice colours that make the code easier to read disappear. How do I stop that from happening? > > Any help much appreciated. > Python source code is a plain text file, which has no colors. The colors are used by your Python Shell only for displaying to the screen. When Python Shell reloads Python source, it presumably reparses the text and shows it with colors. My guess is that by naming the file without a .py extension, you convinced Python Shell that it was NOT source code, and therefore shouldn't be colorized. -- DaveA