| Reply | « Previous Thread | Next Thread » |
|
Code:
import codecs,e32,appuifw
path = "E:\\a.txt"
def read_settings_array():
f = codecs.open(path, 'r', 'utf8')
settingsfile = f.read()
settings = settingsfile.split(":");
f.close()
return settings
o=read_settings_array()[1]
e32.ao_sleep(o)
appuifw.note(u'ok')
e32.ao_sleep(o) TypeError: bad argument type for built-in operation i hope u ![]() |
| cool_eagle |
| View Public Profile |
| Find all posts by cool_eagle |
|
Join Date: Feb 2008
Posts: 2,542
Location: Bhavnagar, Gujarat, India
gaba88
Offline
Forum Nokia Champion
|
|
|
Quote:
Gargi Das- http://gargidas.blogsot.com Forum Nokia Python Wiki Learn Python at http://mobapps.org/PyS60 |
|
text= wait:5
or text= wait:15 i want to use content of text |
| cool_eagle |
| View Public Profile |
| Find all posts by cool_eagle |
|
plz help me
![]() |
| cool_eagle |
| View Public Profile |
| Find all posts by cool_eagle |
|
Join Date: Feb 2008
Posts: 2,542
Location: Bhavnagar, Gujarat, India
gaba88
Offline
Forum Nokia Champion
|
|
i cant get you properly but i am feeling that you want make a wait.
try this i have modified your code. Code:
import codecs,e32,appuifw
path = "E:\\a.txt"
def read_settings_array():
f = codecs.open(path, 'r', 'utf8')
settingsfile = f.read()
settings = settingsfile.split(":");
f.close()
return settings
o=read_settings_array()[1]
e32.ao_sleep(0)
appuifw.note(u'ok')
Gargi Das- http://gargidas.blogsot.com Forum Nokia Python Wiki Learn Python at http://mobapps.org/PyS60 |
|
Quote:
i want use content of text... example : e\\a.txt = 15 , 23 i want to wait by the text |
| cool_eagle |
| View Public Profile |
| Find all posts by cool_eagle |
|
Code:
import codecs,e32,appuifw
path = "E:\\a.txt"
def read_settings_array():
f = codecs.open(path, 'r', 'utf8')
settingsfile = f.read()
settings = settingsfile.split(":");
f.close()
return settings
t=read_settings_array()[1]
e32.ao_sleep(t)
appuifw.note(u'ok')
e32.ao_sleep(t) TypeError: bad argument type for built-in operation i want to tell it |
| cool_eagle |
| View Public Profile |
| Find all posts by cool_eagle |
|
Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
Offline
Forum Nokia Champion
|
|
In that case, the problem is that you are trying to pass a string as an argument instead of an integer. Try this:
Code:
import codecs,e32,appuifw
path = "E:\\a.txt"
def read_settings_array():
f = codecs.open(path, 'r', 'utf8')
settingsfile = f.read()
settings = settingsfile.split(":")
f.close()
return settings
t=read_settings_array()[1]
e32.ao_sleep(int(t))
appuifw.note(u'ok')
|
|
Quote:
thanks for it. my app is running ![]() |
| cool_eagle |
| View Public Profile |
| Find all posts by cool_eagle |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Problem of text not getting displayed in CAknTextQueryDialog on e61i | neekasa | General Symbian C++ | 9 | 2009-07-10 14:56 |
| Problem while Reading text file in Nokia3650 | lalithunt | Mobile Java General | 5 | 2008-07-30 18:19 |
| A problem reading a text in mobile | aamitgupta | Mobile Java General | 3 | 2008-01-14 16:35 |
| ENumerated text Control Problem | j_b_luo | Carbide.c++ IDE and plug-ins | 1 | 2007-11-30 22:41 |
| Problem on getting item text from listbox | imjude | General Symbian C++ | 2 | 2007-11-27 14:55 |