> TRUNCATED = index("C:\\TextFileName.txt","TRUNCATED")
You asked the index function to search in the filepath.
No matter what is in the file, this would give a positive result:
TRUNCATED = index("C:\\TRUNCATED\\TextFileName.txt","TRUNCATED")
Instead, ask it to look in the file's contents:
contents = file.readall("C:\\TextFileName.txt")
TRUNCATED = index(contents,"TRUNCATED")
or:
TRUNCATED = index(file.readall("C:\\TextFileName.txt"),"TRUNCATED")
------------------------ Yahoo! Groups Sponsor --------------------~-->
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/JV_rlB/TM
--------------------------------------------------------------------~->
Attention: PowerPro's Web site has moved: http://www.ppro.org
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/power-pro/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/