Update editor.py

Close #166