Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news2.arglkargh.de!news.mixmin.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed2.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.104 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.80; '*S*': 0.01; 'cpython': 0.05; 'subject:file': 0.07; 'currently,': 0.09; 'api': 0.11; "wouldn't": 0.14; 'windows': 0.15; 'caches': 0.16; 'naming': 0.16; 'header :User-Agent:1': 0.23; 'artist': 0.24; 'characters': 0.30; 'file': 0.32; 'run': 0.32; "i'd": 0.34; 'received:209.85': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'really': 0.36; '(e.g.,': 0.36; 'received:209': 0.37; 'easily': 0.37; 'message- id:@gmail.com': 0.38; 'problems': 0.38; 'to:addr:python-list': 0.38; 'files': 0.38; 'to:addr:python.org': 0.39; 'most': 0.60; 'such': 0.63; 'forward': 0.65; 'strategies': 0.77; '3.3.1': 0.84; '9.1': 0.84; 'conflicts': 0.84; 'freebsd': 0.84; 'subject:Making': 0.84 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 :x-enigmail-version:content-type:content-transfer-encoding; bh=He1hadVw1oWxWQF3AENkhBqCrZczQuxfpaICaD4HotQ=; b=lr45YFRA0R3AywpCQY1Yivw7bJKlMBAfhYwY/9SVwZAqttSlgOhxRK2rSU7P4CtA2P oqzJntBvvfXMzqS760bU96qNjEvjvj2vqecy5JGPEjIcdeKDyB6KZbEtmTIEcX/Q0aV/ 4bBaX8yCMlFl61ZyUdaUXyL0JlZ2ZVp0cd6BIcr3qUbu+Hi3UCJIGRhHfPK/0hn1dEtx qHDid72L2If9eQuaFa2HFtpNT1bjN07/bjPCPErwD6r1ekQpoSvouRVfbsPZIQtbJ63w rQhFYYHe5UzcnKkK9LlO/9wHNeCa+u91zb9JdhfjLDIZ4PJF7tcyNCsRiOiLhFaSq685 OBcw== X-Received: by 10.236.114.132 with SMTP id c4mr3349851yhh.205.1367956741507; Tue, 07 May 2013 12:59:01 -0700 (PDT) Date: Tue, 07 May 2013 14:58:59 -0500 From: Andrew Berg 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" Subject: Making safe file names 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 6 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1367956750 news.xs4all.nl 15874 [2001:888:2000:d::a6]:54069 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:44900 Currently, I keep Last.fm artist data caches to avoid unnecessary API calls and have been naming the files using the artist name. However, artist names can have characters that are not allowed in file names for most file systems (e.g., C/A/T has forward slashes). Are there any recommended strategies for naming such files while avoiding conflicts (I wouldn't want to run into problems for an artist named C-A-T or CAT, for example)? I'd like to make the files easily identifiable, and there really are no limits on what characters can be in an artist name. -- CPython 3.3.1 | Windows NT 6.2.9200 / FreeBSD 9.1