pinokiod 1.0.49 → 1.0.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/kernel/api/fs/index.js +2 -1
- package/kernel/python/index.js +4 -2
- package/package.json +1 -1
package/kernel/api/fs/index.js
CHANGED
package/kernel/python/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
const path = require('path')
|
|
2
|
-
const nodecallspython = require("node-calls-python");
|
|
3
2
|
class Python {
|
|
4
3
|
constructor(kernel) {
|
|
5
4
|
this.kernel = kernel
|
|
6
5
|
}
|
|
7
|
-
async call(modname, modpath, method, args) {
|
|
6
|
+
async call(modname, modpath, method, args, ondata) {
|
|
7
|
+
console.log("CALL", { modname, modpath, method, args })
|
|
8
8
|
// if this.proc doesn't exist, create
|
|
9
9
|
if (!this.proc) {
|
|
10
10
|
await this.kernel.exec({
|
|
@@ -14,6 +14,7 @@ class Python {
|
|
|
14
14
|
],
|
|
15
15
|
conda: "base"
|
|
16
16
|
}, (s) => {
|
|
17
|
+
ondata(s)
|
|
17
18
|
})
|
|
18
19
|
await new Promise((resolve, reject) => {
|
|
19
20
|
this.kernel.exec({
|
|
@@ -22,6 +23,7 @@ class Python {
|
|
|
22
23
|
conda: "base"
|
|
23
24
|
}, (s) => {
|
|
24
25
|
// process.stdout.write(s)
|
|
26
|
+
ondata(s)
|
|
25
27
|
if (/Uvicorn running on/i.test(s.cleaned)) {
|
|
26
28
|
resolve()
|
|
27
29
|
}
|