Fix code to work with pyQode/pyqode.core#140