import StringIO
def DelLastChar(str):
str_list=list(str)
str_list.pop()
return "".join(str_list)
allText = editor.getText()
selectText = editor.getSelText()
lineIndex = 0
javaText = "("
for line in StringIO.StringIO(selectText):
line = "'"+line.replace("\r\n","")+"',"
javaText = javaText + line
lineIndex = lineIndex + 1
console.write(line)
javaText = DelLastChar(javaText)
javaText = javaText + ")"
editor.setText(javaText)
editor.selectAll()
editor.copy()
editor.setText(allText)
notepad++ pythonScript插件之列转SQL查询条件
最新推荐文章于 2022-12-10 15:14:40 发布