create a text file

Bruno Desthuilliers bdesth.quelquechose at free.quelquepart.fr
Mon May 29 19:39:37 EDT 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 os.open(<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 os.open().

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