[Zope] windows python differences
garry saddington
garry at schoolteachers.co.uk
Thu May 18 18:21:50 EDT 2006
This code on linux works without a problem
ispell = os.popen("echo " + word +
| /opt/scholarpack/ancillary/ispell/bin/ispell -a")
ispell.readline
sentence = ispell.readline()
if (sentence[0] == '&'):
parts = string.split(sentence, ": ")
gluedwords = parts[1]
words = string.split(gluedwords,", ")
length = len(words)
words[length-1] = words[length-1][0:len(words[length-1]) - 1]
return [word] + words
elif (sentence[0] == '#') or (sentence[0] == '?'):
return [word]
else:
return []
however on windows it throws a string index out of range at the
sentence[0] constructs.
the popen command on windows is:
ispell=os.popen("echo" +word+ "\scholarpack\ancillary\ispell\bin\ispell
-a")
Anyone know what the difference is on the two platforms?
regards
garry
More information about the Zope
mailing list