mirror of
https://github.com/gnh1201/welsonjs.git
synced 2024-11-26 15:31:42 +00:00
Create python3.js
This commit is contained in:
parent
3032abbdee
commit
39fe47042f
30
lib/python3.js
Normal file
30
lib/python3.js
Normal file
|
@ -0,0 +1,30 @@
|
|||
var SHELL = require("lib/shell");
|
||||
|
||||
function PythonObject() {
|
||||
this.version = "3.10.2-embed";
|
||||
this.platform = "amd64";
|
||||
|
||||
this.setVersion = function(version) {
|
||||
this.version = version;
|
||||
};
|
||||
|
||||
this.setPlatform = function(platform) {
|
||||
this.platfrom = platform;
|
||||
};
|
||||
|
||||
this.exec = function(scriptName, args) {
|
||||
return SHELL.exec([
|
||||
"bin\\python-" + this.version + "\\" + this.platform + "\\python",
|
||||
scriptName
|
||||
].concat(args));
|
||||
};
|
||||
}
|
||||
|
||||
exports.PythonObject = PythonObject;
|
||||
exports.create = function() {
|
||||
return new PythonObject();
|
||||
};
|
||||
|
||||
exports.VERSIONINFO = "Python Interface (python3.js) version 0.1";
|
||||
exports.global = global;
|
||||
exports.require = global.require;
|
Loading…
Reference in New Issue
Block a user