create a text file

Bruno Desthuilliers bdesth.quelquechose at
Tue May 30 01:39:37 CEST 2006

Stan Cook a écrit :
> I'm writing a script to list all of my music files' id3 tags to a comma 
> delimited file.  The only part I'm missing seems like it should be the 
> simplest.  I haven't used Python for the last couple of years.  My 
> question is this:
> When I use<file_variable>,"w"), I get an error message,        
> TypeError: an integer is required.  Has something changed?  Did I miss 
> something???

You want open() (the builtins one), not

Also, if you want to deal with csv files, you may want to check the csv 
module (if you don't use it already).

More information about the Python-list mailing list