diff --git a/index.js b/index.js index c19811d..8fbba71 100644 --- a/index.js +++ b/index.js @@ -9,6 +9,8 @@ const PYTHON_BRIDGE_SCRIPT = path.join(__dirname, 'node_python_bridge.py'); function pythonBridge(opts) { // default options let intepreter = opts && opts.python || 'python'; + let args = opts && opts.args || []; + args.push(PYTHON_BRIDGE_SCRIPT); let stdio = opts && opts.stdio || ['pipe', process.stdout, process.stderr]; let options = { cwd: opts && opts.cwd, @@ -19,7 +21,7 @@ function pythonBridge(opts) { }; // create process bridge - let ps = child_process.spawn(intepreter, [PYTHON_BRIDGE_SCRIPT], options); + let ps = child_process.spawn(intepreter, args, options); let queue = singleQueue(); function sendPythonCommand(type, enqueue, self) {