error: an integer is required

madigreece at yahoo.gr madigreece at yahoo.gr
Mon Jun 8 14:02:02 EDT 2009


I execute my code in linux environment.
My code is:

from os import *

def insert_text_file(self, strng):
     t=open("elements_file.txt", "a")
     t.write(strng)
     t.close()

I'm getting this error:

<type 'exception.TypeError'>: an integer is required

Where is the mistake?
Help me, please!!



More information about the Python-list mailing list