Dangerous autocompletes
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
I'm using pywin32 build 210. Some autocompletes are dangerous (and should be trapped in my opinion).
Try typing the following in Pythonwin:
# Maybe we should use raw_input().
f = input()
When you type the "." character in the comment, Pythonwin evaluates raw_input() in order to fetch its attributes, and pops up an input prompt.
Well, OK, not a huge problem. We can just cancel the prompt.
Now try this one:
# Maybe we should use os._exit(0).
sys.exit(0)
Pythonwin crashes hard. Obviously it's a dynamic language and you can't protect everyone from everything, but maybe these two could be trapped by the autocompleter and not evaluated.