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


Groups > comp.lang.python > #44933

Re: Making safe file names

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <bahamutzero8825@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.119
X-Spam-Level *
X-Spam-Evidence '*H*': 0.76; '*S*': 0.00; 'cpython': 0.05; 'subject:file': 0.07; 'escape': 0.09; 'filenames': 0.09; 'occasionally': 0.09; 'window?': 0.09; 'windows': 0.15; 'finite': 0.16; 'wrote:': 0.18; 'small,': 0.19; 'typing': 0.19; 'work,': 0.20; 'comfortable': 0.22; 'header:User-Agent:1': 0.23; 'artist': 0.24; 'necessary.': 0.24; 'own.': 0.24; 'header:In-Reply-To:1': 0.27; 'characters': 0.30; 'code': 0.31; 'received:209.85.213.174': 0.31; 'trouble': 0.34; 'received:209.85': 0.35; 'case,': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'list': 0.37; 'list.': 0.37; 'received:209': 0.37; 'being': 0.38; 'message-id:@gmail.com': 0.38; 'problems': 0.38; 'displays': 0.38; 'to:addr:python-list': 0.38; 'anything': 0.39; 'to:addr:python.org': 0.39; 'enough': 0.39; 'even': 0.60; 'read': 0.60; 'dave': 0.60; "you're": 0.61; 'soon': 0.63; 'more': 0.64; 'different': 0.65; 'worth': 0.66; 'invalid': 0.68; 'hoping': 0.75; '3.3.1': 0.84; '9.1': 0.84; 'characters,': 0.84; 'freebsd': 0.84; 'subject:Making': 0.84; 'angel': 0.91; 'reply,': 0.93
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=yVjBcc8Ptl6vjhbDk2OC31wgyoBlkk+mQ2InBWOUFqw=; b=nFbTn7bmhAiAEXZwM+wlnFv8BJFN5EJHDWS7T6YTnaq0/AAh36wUPGbm6eqeKfUhRb jVah6BCx3VPvKKb2ODUVrSs1NAP/eTkYnXKq7hujomcdIAgGTV2VD+OafaCLlrQ/ijWS /9dfwrx0N9pa9R0ewt5LXIREi58jldWHcE3v644is6BPG+q3/YgQKhe2MWo/VoFekSVP HezdkTL431CFnxiiOOSAN+ScnGlzGdoyyDPn9038Ab29kcF7Hs22y5WHMKpAUorvqg6Z AuMle3d7QVU+T2UPCrWweyWr+e0BuOJ8lMxfBnlQfFQrd9RjOTnx0MpH1WmNu9P239o7 RRgQ==
X-Received by 10.236.162.164 with SMTP id y24mr4682158yhk.14.1367979702707; Tue, 07 May 2013 19:21:42 -0700 (PDT)
Date Tue, 07 May 2013 21:21:41 -0500
From Andrew Berg <bahamutzero8825@gmail.com>
User-Agent Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2
MIME-Version 1.0
To "comp.lang.python" <python-list@python.org>
Subject Re: Making safe file names
References <51895D03.4000300@gmail.com> <518998FE.6030805@davea.name> <5189A18C.5060109@gmail.com> <5189A6A7.4040104@davea.name>
In-Reply-To <5189A6A7.4040104@davea.name>
X-Enigmail-Version 1.5.1
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 7bit
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 <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1438.1367979705.3114.python-list@python.org> (permalink)
Lines 16
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1367979705 news.xs4all.nl 15916 [2001:888:2000:d::a6]:38201
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:44933

Show key headers only | View raw


On 2013.05.07 20:13, Dave Angel wrote:
> So you're comfortable typing arbitrary characters?  what about all the 
> characters that have identical displays in your font?
Identification is more important than typing. I can copy and paste into a terminal if necessary. I don't foresee typing out one of the
filenames being anything more than a rare occurrence, but I will occasionally just read the list.
> What about viewing 
> 0x07 in the terminal window?  Or 0x04?
I don't think Last.fm will even send those characters. In any case, control characters in artist names are rare enough that it's not worth
the trouble to write the code to avoid the problems associated with them.
> As soon as you have a small, finite list of invalid characters, writing 
> an escape system is pretty easy.
Probably. I was just hoping there was an existing system that would work, but as I said in a different reply, it would seem I need to roll
my own.

-- 
CPython 3.3.1 | Windows NT 6.2.9200 / FreeBSD 9.1

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


Thread

Re: Making safe file names Andrew Berg <bahamutzero8825@gmail.com> - 2013-05-07 21:21 -0500

csiph-web