Good day,
I've ran into a problem with opening a file with randomly generated name in Python 2.6.
import random
random = random.randint(1,10)
localfile = file("%s","wb") % random
Then I get an error message about the last line
TypeError: unsupported operand type(s) for %: 'file' and 'int'
I just couldn't figure this out by myself nor with Google, but there has to be a cure for this, I believe.
Thanks.