Speed improvements for reading text lines and the option to specify a range for Text.asLines([start[, end]]) Also some tweaks for the plug-in scripts and updates to pydocs.

This commit is contained in:
2008-08-12 15:17:08 +00:00
parent 0410775e2e
commit 65d0ef3e74
8 changed files with 102 additions and 40 deletions

View File

@@ -49,9 +49,7 @@ def main():
immediate = True
pos += 5
for i in range(pos, c):
if line[i]=='.':
pos = i+1
elif not line[i].isalnum() and line[i] != '_':
if not line[i].isalnum() and line[i] != '_' and line[i] != '.':
immediate = False
break
@@ -59,7 +57,7 @@ def main():
if immediate:
items = [(m, 'm') for m in get_modules()]
items.sort(cmp = suggest_cmp)
txt.suggest(items, '')
txt.suggest(items, line[pos:c])
return
# Found 'from' earlier, suggest import if not already there