在尝试使模块与python-shell(see issue #7)配合使用时,我遇到了这种奇怪的情况
演示:https://repl.it/@almenon/FabulousFocusedDiscussion?language=nodejs
这有效:
let childProcess = require('child_process').spawn("python", ["-m", "timeit", "-n 1", "'x=5'"]);
这不起作用:
let childProcess = require('child_process').spawn("python", ["-m timeit", "-n 1", "'x=5'"]);
将导致错误:
“ C:\ Program Files \ Python36 \ python.exe:没有名为timeit的模块”
出了什么问题?