Re: error: an integer is required

2009-06-14 Thread jeni
On 8 Ιούν, 21:46, Terry Reedy  wrote:
> madigre...@yahoo.gr wrote:
> > 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:
>
> > : an integer is required
>
> > Where is the mistake?
> > Help me, please!!
>
> Tell us the Python version and give the *full* traceback message, not
> just the last line.  I am pretty sure you also left out an important
> part of the code you executed to get that message.
>
> tjr- Απόκρυψη κειμένου σε παράθεση -
>
> - Εμφάνιση κειμένου σε παράθεση -

With both import os and os.open there is the same error. I have
developed in python a game for OPLC. When I run the game in Python
2.5.2 at Windows there is no problem. But after I play a game at OLPC
I get the following message:


 Traceback (most recent call last)

/home/olpc/Activities/Kremala.activity/Kremala.py in add_letter
(self=, widget=,
grama='i')
-->   self.find_w()
  self.find_w=>

/home/Activities/Kremala.activity/Kremala.py in find_w
(self=)
  self.show_gr()
--> self.sosti_leksi()
   self.sosti_leksi==>

/home/Activities/Kremala.activity/Kremala.py in sosti_leksi
(self=)
  s=self.categ+":"+str(1)+" nikh me "+str(6-self.m)+"prospatheies
\n"
--> self.insert_text_file(s)
self.insert_text_file===>

/home/Activities/Kremala.activity/Kremala.py in insert_text_file
(self=, strng='geografia:1 nikh me 2 prospatheies\n')
-->  t=open("elements_file.txt", "a")
global open=
  t.write(strng)
  t.close()

: an integer is required

OLPC's software is important?
-- 
http://mail.python.org/mailman/listinfo/python-list


: an integer is required

2009-06-15 Thread jeni
I have developed in python a game for OPLC. When I run the game in
Python 2.5.2 at Windows there is no problem. But after I play a game
at OLPC I get the following message:

 Traceback (most recent call last)

/home/olpc/Activities/Kremala.activity/Kremala.py in add_letter
(self=, widget=,
grama='i')
-->   self.find_w()
  self.find_w=>

/home/Activities/Kremala.activity/Kremala.py in find_w
(self=)
  self.show_gr()
--> self.sosti_leksi()
   self.sosti_leksi==>

/home/Activities/Kremala.activity/Kremala.py in sosti_leksi
(self=)
  s=self.categ+":"+str(1)+" nikh me "+str(6-self.m)+"prospatheies
\n"
--> self.insert_text_file(s)
self.insert_text_file===>

/home/Activities/Kremala.activity/Kremala.py in insert_text_file
(self=, strng='geografia:1 nikh me 2 prospatheies\n')
-->  t=open("elements_file.txt", "a")
global open=
  t.write(strng)
  t.close()

: an integer is required

OLPC's software is important?
-- 
http://mail.python.org/mailman/listinfo/python-list