error in reading Text file
I am little new to sikuli and python, I am read a text file (text2.txt)
my programming decision depend on first line of this text file
if first line is "Done" then this file is wrong.
if first line is other than "Done" so program call some function and run it
but problem is that when this text line contain only one line "Done" then it work and exit program after popup,
if by mistake there is one more line in text file(first line is "Done") program can not exit
I really appreciate for help.
(sorry if any mistake in Description , If you don't get I can brief here once again)
Here is my code
#######
f = open("c:
sumlist = []
for line in f.readlines():
sumlist.
print (line)
f.close()
kk = sumlist[0]
kk = str(kk)
popup(kk)
if kk == "Done":
popup("Wrong Database is created Fill all required cell in Excel and run tool again", "DataBase" )
exit(1)
else:
#call some function
#######
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- RaiMan
- Solved:
- Last query:
- Last reply: