Making safe file names

Andrew Berg bahamutzero8825 at gmail.com
Tue May 7 15:58:59 EDT 2013


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



More information about the Python-list mailing list