I try to create a file file with a unique file name, every time my script is executed, it is intended only for weekly or monthly. so I decided to use a date for the file name.
f = open('%s.csv', 'wb') %name
where i get this error.
Traceback (most recent call last): File "C:\Users\User\workspace\new3\stjohnsinvoices\BabblevoiceInvoiceswpath.py", line 143, in <module> f = open('%s.csv', 'ab') %name TypeError: unsupported operand type(s) for %: 'file' and 'str'
It works, if I use a static file name, is there a problem with an open function, so you can not pass such a line?
name is a string and has values such as:
31/1/2013BVI
Thanks so much for any help
jbaldwin
source share