如下为java风格字符串拷贝
import StringIO
allText = editor.getText()
selectText = editor.getSelText()
lineIndex = 0
javaText = ""
for line in StringIO.StringIO(selectText):
line = "\""+line.replace("\r\n","")+"\\n\" +\r\n"
javaText = javaText + line
lineIndex = lineIndex + 1
console.write(line)
editor.setText(javaText)
editor.selectAll()
editor.copy()
editor.setText(allText)