Update python3.js

This commit is contained in:
Namhyeon Go 2022-01-25 16:49:36 +09:00 committed by GitHub
parent 1526158068
commit cc42490106
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,7 +12,7 @@ function PythonObject() {
this.platfrom = platform; this.platfrom = platform;
}; };
this.exec = function(scriptName, args) { this.execScript = function(scriptName, args) {
return SHELL.exec([ return SHELL.exec([
"bin\\python-" + this.version + "\\" + this.platform + "\\python", "bin\\python-" + this.version + "\\" + this.platform + "\\python",
scriptName scriptName
@ -21,10 +21,15 @@ function PythonObject() {
} }
exports.PythonObject = PythonObject; exports.PythonObject = PythonObject;
exports.create = function() { exports.create = function() {
return new PythonObject(); return new PythonObject();
}; };
exports.execScript = function(scriptName, args) {
return (new PythonObject()).execScript(scriptName, args);
};
exports.VERSIONINFO = "Python Interface (python3.js) version 0.1"; exports.VERSIONINFO = "Python Interface (python3.js) version 0.1";
exports.global = global; exports.global = global;
exports.require = global.require; exports.require = global.require;