create a text file

Fredrik Lundh fredrik at pythonware.com
Mon May 29 16:12:53 EDT 2006


Stan Cook wrote:

> 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???

the function is called "open", not "os.open".

there's an open function in the os module, but that's doing something 
slightly different (see the library reference documentation for details 
if you're curious).

</F>




More information about the Python-list mailing list