Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #65197

Re: Python shell wont open idle or an exisiting py file

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'mrab': 0.05; 'subject:Python': 0.06; 'abuse': 0.07; 'encoded': 0.07; 'subject:file': 0.07; 'utf-8': 0.07; 'string': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'strings.': 0.09; 'yeah,': 0.09; 'jan': 0.12; 'etc?': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'later': 0.20; 'written': 0.21; 'feb': 0.22; 'header:User-Agent:1': 0.23; 'byte': 0.24; 'string,': 0.24; 'this:': 0.26; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; "doesn't": 0.30; 'url:wiki': 0.31; 'url:wikipedia': 0.31; 'violation': 0.31; 'ago': 0.33; 'common': 0.35; 'but': 0.35; 'url:org': 0.36; 'should': 0.36; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'heard': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'skip:u 10': 0.60; 'received:173': 0.61; 'first': 0.61; 'become': 0.64; 'special': 0.74; 'received:fios.verizon.net': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Terry Reedy <tjreedy@udel.edu>
Subject Re: Python shell wont open idle or an exisiting py file
Date Sat, 01 Feb 2014 00:46:32 -0500
References <24EAA33389A147D8BC08B029E2209E16@UserPC> <lcguq4$a3s$1@ger.gmane.org> <lchjk7$8og$1@ger.gmane.org> <CAPTjJmpc6+hSjTy9tn_AMNMVsdnfQh6E+GHx0a=SmJmJ5=5Uvw@mail.gmail.com> <52EC61FF.4060204@mrabarnett.plus.com> <CAPTjJmrPNEvo4D=ZYcFxadAbyYm4+r=c1rAr-Cvpmw2_SDNsTA@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host pool-173-75-254-207.phlapa.fios.verizon.net
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0
In-Reply-To <CAPTjJmrPNEvo4D=ZYcFxadAbyYm4+r=c1rAr-Cvpmw2_SDNsTA@mail.gmail.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.6268.1391233806.18130.python-list@python.org> (permalink)
Lines 21
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1391233806 news.xs4all.nl 2936 [2001:888:2000:d::a6]:41715
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:65197

Show key headers only | View raw


On 1/31/2014 10:36 PM, Chris Angelico wrote:
> On Sat, Feb 1, 2014 at 1:54 PM, MRAB <python@mrabarnett.plus.com> wrote:
>> I think that some years ago I heard about a variation on UTF-8
>> (Microsoft?) where codepoint U+0000 is encoded as 0xC0 0x80 so that the
>> null byte can be used as the string terminator.
>>
>> I had a look on Wikipedia found this:
>>
>> http://en.wikipedia.org/wiki/Null-terminated_string
>
> Yeah, it's a common abuse of UTF-8. It's a violation of spec, but an
> understandable one. However, I don't understand why the first part -
> why should \0 become U+0000 but (presumably) the \a later on
> (...cs\accel...) doesn't become U+0007, etc?

Because only  \0 has a special meaning in a C string, and Tk is written 
in C and uses C strings.

-- 
Terry Jan Reedy

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Python shell wont open idle or an exisiting py file Terry Reedy <tjreedy@udel.edu> - 2014-02-01 00:46 -0500

csiph-web