Making safe file names

Andrew Berg bahamutzero8825 at gmail.com
Tue May 7 22:21:41 EDT 2013


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



More information about the Python-list mailing list