I am trying to compute 8-character short unique random filenames for, let\'s say, thousands of files without probable name collision. Is this method safe enough?
Your current method should be safe enough, but you could also take a look into the uuid module. e.g.
import uuid print str(uuid.uuid4())[:8]
Output:
ef21b9ad