Skip to content

Commit b34e125

Browse files
authored
Merge pull request #133 from CADBOT/python3-fix
use python3 binary on unix systems
2 parents df47458 + f267780 commit b34e125

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,12 @@ var PythonShell = function (script, options) {
4545
var self = this;
4646
var errorData = '';
4747
EventEmitter.call(this);
48-
48+
4949
options = extend({}, PythonShell.defaultOptions, options);
50-
var pythonPath = options.pythonPath || 'python';
50+
var pythonPath;
51+
if (!options.pythonPath) {
52+
pythonPath = process.platform != "win32" ? "python3" : "python"
53+
} else pythonPath = options.pythonPath;
5154
var pythonOptions = toArray(options.pythonOptions);
5255
var scriptArgs = toArray(options.args);
5356

0 commit comments

Comments
 (0)