Add files via upload

This commit is contained in:
Namhyeon Go 2023-09-07 20:14:06 +09:00 committed by GitHub
parent 8903a3ca8f
commit cdd086bb98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,35 +1,39 @@
var SHELL = require("lib/shell");
function PythonObject() {
function PythonObject(platform) {
this.version = "3.10.2-embed";
this.platform = "amd64";
this.platform = platform;
this.setVersion = function(version) {
this.version = version;
};
this.setPlatform = function(platform) {
this.platfrom = platform;
};
this.execScript = function(scriptName, args) {
return SHELL.exec([
"bin\\python-" + this.version + "\\" + this.platform + "\\python",
scriptName
].concat(args));
};
this.runScript = function(scriptName, args) {
return SHELL.show([
"bin\\python-" + this.version + "\\" + this.platform + "\\python",
scriptName
].concat(args));
};
}
exports.PythonObject = PythonObject;
exports.create = function() {
return new PythonObject();
exports.create = function(platform) {
var platform = (typeof platform !== "undefined" ? platform : "amd64");
return new PythonObject(platform);
};
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.2";
exports.global = global;
exports.require = global.require;