Skip to content

Commit f267780

Browse files
author
Charles Crawford
committed
use python3 binary on unix systems
1 parent df47458 commit f267780

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)