set write filename in python