so when i run this in python interpiter it works

>>> import os
>>> b= os.path.getsize("/path/isa_005.mp3")
>>> b
2071611L
>>>

but when i run it in a script

b= os.path.getsize("/path/isa_005.mp3")
FILE.writelines(b)

i get an error.
any one know how i can get it to print the size of the file as text?

str() is your friend.

FILE.writelines( str(b) )
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.