Use an external editor to program your python-scripts, open it in blender with Shift-Alt-F. After some changes inside the text-editor you can easily reopen the file in blender with Ctrl-Alt-R.
An external editor (e.g. UltraEdit, (X)Emacs) has also some advantages like syntax-higlight, auto-indention, abbrevs. and so on.