| Reply | « Previous Thread | Next Thread » |
|
How to fix this error :
import appuifw text= appuifw.Text pth="c:\\test2.txt" f=open(pth,'r') text.set(Unicode(f.read().decode('utf_8'))) f.close() the error return : AttributeError: 'builtin_function_or_method' object has no attribute 'set' |
|
Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
Offline
Forum Nokia Champion
|
|
|
Quote:
If so, try: Code:
import appuifw
text=appuifw.Text()
pth="c:\\test2.txt"
f=open(pth,'r')
text.add(u"%s" % (f.read().decode('utf_8')))
f.close()
appuifw.app.body=text #This line is so you can see the result immediately
|
|
thanks ,
i fix the error : i forget the bracktes () text= appuifw.Text => text= appuifw.Text() now it work. |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| telephone.call_state AttributeError | maverick4ml | Python | 0 | 2008-01-08 22:08 |
| problem with canvas.text and appuifw.text | luke14free | Python | 1 | 2006-11-01 10:43 |
| Formating color, style appuifw.Text not work | adywicaksono | Python | 3 | 2006-05-03 07:39 |
| Does appuifw.Text input support normal text? | bercobeute | Python | 2 | 2006-02-22 09:43 |
| appuifw.Text() bug ? | sznever | Python | 2 | 2005-07-05 15:31 |