在原子中编译python
问题描述:
我使用atom来编译我的python代码。我想测试我的IDE.But我面对这个problem.This是错误:在原子中编译python
Uncaught TypeError: Bad argument
internal/child_process.js:289
TypeError: Bad argument
at TypeError (native)
at ChildProcess.spawn (internal/child_process.js:289:26)
at Object.exports.spawn (child_process.js:392:9)
at compile (C:\Users\wenzh\.atom\packages\gpp-compiler\index.js:274:31)
at compileFile (C:\Users\wenzh\.atom\packages\gpp-compiler\index.js:216:5)
at atom-text-editor.gpp-compiler:compile (C:\Users\wenzh\.atom\packages\gpp-compiler\index.js:23:11)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\wenzh\AppData\Local\atom\app-1.15.0\resources\app.asar\src\command-registry.js:259:29)
at C:\Users\wenzh\AppData\Local\atom\app-1.15.0\resources\app.asar\src\command-registry.js:3:59
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (C:\Users\wenzh\AppData\Local\atom\app-1.15.0\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:599:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (C:\Users\wenzh\AppData\Local\atom\app-1.15.0\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:390:22)
at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (C:\Users\wenzh\AppData\Local\atom\app-1.15.0\resources\app.asar\src\window-event-handler.js:106:36)
在最后,原子说:
The error was thrown from the gpp-compiler package. This issue has already been reported.
如何解决这个问题呢谢谢!
答
我刚刚解决了这个问题。你可以去“File” - >“Keymap ...”,然后打开文件“keymap.cson”。您可以在底部添加以下内容。这意味着F7为GPP编译器,并为F5运行蟒:
'.editor:not(.mini)':
"f7": "gpp-compiler:compile"
"f5": "Python run: run-f5"
它缝的开放问题的原子:http://stackoverflow.com/questions/43200319/compiling-python-in-atom,因此,更好的直接问他们(github) – Paddy