@basthon/kernel-python3 0.36.4 → 0.36.8
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/lib/dist/basthon.js +1 -1
- package/lib/dist/modules/IPython-0.0.1-py3-none-any.whl +0 -0
- package/lib/dist/modules/graphviz-0.0.1-py3-none-any.whl +0 -0
- package/lib/dist/modules/ipythonblocks-0.0.1-py3-none-any.whl +0 -0
- package/lib/dist/modules/ivp-0.0.1-py3-none-any.whl +0 -0
- package/lib/dist/modules/lolviz-0.0.1-py3-none-any.whl +0 -0
- package/lib/dist/modules/p5-0.0.1-py3-none-any.whl +0 -0
- package/lib/dist/modules/proj4py-0.0.1-py3-none-any.whl +0 -0
- package/lib/dist/modules/rcviz-0.0.1-py3-none-any.whl +0 -0
- package/lib/dist/modules/requests-0.0.1-py3-none-any.whl +0 -0
- package/lib/dist/modules/turtle-0.0.1-py3-none-any.whl +0 -0
- package/lib/dist/modules/tutor-0.0.1-py3-none-any.whl +0 -0
- package/lib/kernel.d.ts +8 -0
- package/lib/kernel.js +12 -12
- package/package.json +3 -3
package/lib/dist/basthon.js
CHANGED
|
@@ -175,6 +175,6 @@ Module['FS_createPath']('/lib/python3.8/site-packages', 'basthon', true, true);
|
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
}
|
|
178
|
-
loadPackage({"files": [{"filename": "/lib/python3.8/site-packages/basthon/utils.py", "start": 0, "end": 2379, "audio": 0}, {"filename": "/lib/python3.8/site-packages/basthon/_patch_modules.py", "start": 2379, "end": 14111, "audio": 0}, {"filename": "/lib/python3.8/site-packages/basthon/_pyodide_base.py", "start": 14111, "end": 27245, "audio": 0}, {"filename": "/lib/python3.8/site-packages/basthon/_patch_builtins.py", "start": 27245, "end": 29523, "audio": 0}, {"filename": "/lib/python3.8/site-packages/basthon/_pyodide_console.py", "start": 29523, "end": 41118, "audio": 0}, {"filename": "/lib/python3.8/site-packages/basthon/kernel.py", "start": 41118, "end": 45592, "audio": 0}, {"filename": "/lib/python3.8/site-packages/basthon/_console.py", "start": 45592, "end": 50508, "audio": 0}, {"filename": "/lib/python3.8/site-packages/basthon/packages.py", "start": 50508, "end": 56744, "audio": 0}, {"filename": "/lib/python3.8/site-packages/basthon/__init__.py", "start": 56744, "end": 57082, "audio": 0}], "remote_package_size": 38303, "package_uuid": "
|
|
178
|
+
loadPackage({"files": [{"filename": "/lib/python3.8/site-packages/basthon/utils.py", "start": 0, "end": 2379, "audio": 0}, {"filename": "/lib/python3.8/site-packages/basthon/_patch_modules.py", "start": 2379, "end": 14111, "audio": 0}, {"filename": "/lib/python3.8/site-packages/basthon/_pyodide_base.py", "start": 14111, "end": 27245, "audio": 0}, {"filename": "/lib/python3.8/site-packages/basthon/_patch_builtins.py", "start": 27245, "end": 29523, "audio": 0}, {"filename": "/lib/python3.8/site-packages/basthon/_pyodide_console.py", "start": 29523, "end": 41118, "audio": 0}, {"filename": "/lib/python3.8/site-packages/basthon/kernel.py", "start": 41118, "end": 45592, "audio": 0}, {"filename": "/lib/python3.8/site-packages/basthon/_console.py", "start": 45592, "end": 50508, "audio": 0}, {"filename": "/lib/python3.8/site-packages/basthon/packages.py", "start": 50508, "end": 56744, "audio": 0}, {"filename": "/lib/python3.8/site-packages/basthon/__init__.py", "start": 56744, "end": 57082, "audio": 0}], "remote_package_size": 38303, "package_uuid": "b95947ae-f87f-4e91-b807-8a26dca5e0d6"});
|
|
179
179
|
|
|
180
180
|
})();
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/lib/kernel.d.ts
CHANGED
|
@@ -77,4 +77,12 @@ export declare class KernelPython3 extends KernelBase {
|
|
|
77
77
|
* and the start index.
|
|
78
78
|
*/
|
|
79
79
|
complete(code: string): any;
|
|
80
|
+
/**
|
|
81
|
+
* Change current directory (Python's virtual FS).
|
|
82
|
+
*/
|
|
83
|
+
chdir(path: string): void;
|
|
84
|
+
/**
|
|
85
|
+
* Create directory (Python's virtual FS).
|
|
86
|
+
*/
|
|
87
|
+
mkdir(path: string): void;
|
|
80
88
|
}
|
package/lib/kernel.js
CHANGED
|
@@ -41,7 +41,6 @@ export class KernelPython3 extends KernelBase {
|
|
|
41
41
|
// removing basthon from global namespace
|
|
42
42
|
await pyodide.runPythonAsync("del __basthon__");
|
|
43
43
|
}
|
|
44
|
-
;
|
|
45
44
|
/**
|
|
46
45
|
* Start the Basthon kernel asynchronously.
|
|
47
46
|
*/
|
|
@@ -70,7 +69,6 @@ export class KernelPython3 extends KernelBase {
|
|
|
70
69
|
// waiting until page is loaded
|
|
71
70
|
await this.pageLoad();
|
|
72
71
|
}
|
|
73
|
-
;
|
|
74
72
|
/**
|
|
75
73
|
* Basthon async code evaluation function.
|
|
76
74
|
*/
|
|
@@ -84,21 +82,18 @@ export class KernelPython3 extends KernelBase {
|
|
|
84
82
|
// loading dependencies are loaded by eval
|
|
85
83
|
return await this.__kernel__.eval(code, outCallback, errCallback, data);
|
|
86
84
|
}
|
|
87
|
-
;
|
|
88
85
|
/**
|
|
89
86
|
* Restart the kernel.
|
|
90
87
|
*/
|
|
91
88
|
restart() {
|
|
92
89
|
return this.__kernel__.restart();
|
|
93
90
|
}
|
|
94
|
-
;
|
|
95
91
|
/**
|
|
96
92
|
* Put a file on the local (emulated) filesystem.
|
|
97
93
|
*/
|
|
98
94
|
putFile(filename, content) {
|
|
99
95
|
this.__kernel__.put_file(filename, content);
|
|
100
96
|
}
|
|
101
|
-
;
|
|
102
97
|
/**
|
|
103
98
|
* Put an importable module on the local (emulated) filesystem
|
|
104
99
|
* and load dependencies.
|
|
@@ -106,28 +101,24 @@ export class KernelPython3 extends KernelBase {
|
|
|
106
101
|
putModule(filename, content) {
|
|
107
102
|
return this.__kernel__.put_module(filename, content);
|
|
108
103
|
}
|
|
109
|
-
;
|
|
110
104
|
/**
|
|
111
105
|
* List modules launched via putModule.
|
|
112
106
|
*/
|
|
113
107
|
userModules() {
|
|
114
108
|
return this.__kernel__.user_modules();
|
|
115
109
|
}
|
|
116
|
-
;
|
|
117
110
|
/**
|
|
118
111
|
* Download a file from the VFS.
|
|
119
112
|
*/
|
|
120
113
|
getFile(path) {
|
|
121
114
|
return this.__kernel__.get_file(path);
|
|
122
115
|
}
|
|
123
|
-
;
|
|
124
116
|
/**
|
|
125
117
|
* Download a user module file.
|
|
126
118
|
*/
|
|
127
119
|
getUserModuleFile(filename) {
|
|
128
120
|
return this.__kernel__.get_user_module_file(filename);
|
|
129
121
|
}
|
|
130
|
-
;
|
|
131
122
|
/**
|
|
132
123
|
* Is the source ready to be evaluated or want we more?
|
|
133
124
|
* Usefull to set ps1/ps2 for teminal prompt.
|
|
@@ -135,14 +126,12 @@ export class KernelPython3 extends KernelBase {
|
|
|
135
126
|
more(source) {
|
|
136
127
|
return this.__kernel__.more(source);
|
|
137
128
|
}
|
|
138
|
-
;
|
|
139
129
|
/**
|
|
140
130
|
* Mimic the CPython's REPL banner.
|
|
141
131
|
*/
|
|
142
132
|
banner() {
|
|
143
133
|
return this.__kernel__.banner();
|
|
144
134
|
}
|
|
145
|
-
;
|
|
146
135
|
/**
|
|
147
136
|
* Complete a code at the end (usefull for tab completion).
|
|
148
137
|
*
|
|
@@ -152,5 +141,16 @@ export class KernelPython3 extends KernelBase {
|
|
|
152
141
|
complete(code) {
|
|
153
142
|
return this.__kernel__.complete(code);
|
|
154
143
|
}
|
|
155
|
-
|
|
144
|
+
/**
|
|
145
|
+
* Change current directory (Python's virtual FS).
|
|
146
|
+
*/
|
|
147
|
+
chdir(path) {
|
|
148
|
+
window.pyodide._module.FS.chdir(path);
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Create directory (Python's virtual FS).
|
|
152
|
+
*/
|
|
153
|
+
mkdir(path) {
|
|
154
|
+
window.pyodide._module.FS.mkdir(path);
|
|
155
|
+
}
|
|
156
156
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basthon/kernel-python3",
|
|
3
|
-
"version": "0.36.
|
|
3
|
+
"version": "0.36.8",
|
|
4
4
|
"description": "Basthon - Python3 Kernel",
|
|
5
5
|
"homepage": "https://basthon.fr",
|
|
6
6
|
"bugs": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"clean": "make clean"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@basthon/kernel-base": "^0.36.
|
|
28
|
+
"@basthon/kernel-base": "^0.36.8"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"gulp": "^4.0.2",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "de9fb899dd03ee4f806b065fab4d0ece03328093"
|
|
44
44
|
}
|