mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-29 20:32:44 +08:00
pythonc编码设置
This commit is contained in:
parent
d659fdcc88
commit
f580660ac7
@ -194,11 +194,13 @@ window.temporaryStoreSoldOut = () => {
|
||||
// python -c
|
||||
window.runPythonCommand = py => {
|
||||
try {
|
||||
return child_process.execFileSync("python", ["-c", py], {
|
||||
let result = child_process.execFileSync("python", ["-c", py], {
|
||||
windowsHide: true,
|
||||
encoding: 'buffer'
|
||||
})
|
||||
return iconv.decode(result, utools.isWindows() ? 'gbk' : 'utf8').trim()
|
||||
} catch (e) {
|
||||
utools.showNotification(e)
|
||||
alert(e)
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user