Commit 3583bb3d authored by Romain Casati's avatar Romain Casati
Browse files

python -> python3 + distinguish between language and displayed name.

parent eb8a7080
......@@ -3,7 +3,7 @@ var uglify = require('gulp-uglify');
var concat = require('gulp-concat');
var sourcemaps = require('gulp-sourcemaps');
const kernels = ['python', 'javascript', 'sql'];
const kernels = ['python3', 'javascript', 'sql'];
function gulp_task_kernel(kernel_name) {
return gulp.task(kernel_name, function() {
......
......@@ -59,9 +59,16 @@
/**
* Language implemented in the kernel (string).
* Generally lower case.
*/
language () { throw new NotImplementedError("language"); };
/**
* Language name implemented in the kernel (string).
* As it should be displayed in text.
*/
languageName () { throw new NotImplementedError("languageName"); };
/**
* Launch the kernel.
*/
......@@ -100,7 +107,7 @@
complete (code) { return []; };
banner () { return `Welcome to the ${this.language()} REPL!`; };
banner () { return `Welcome to the ${this.languageName()} REPL!`; };
ps1 () { return ">>> "; };
......
......@@ -21,7 +21,8 @@
window: undefined,};
};
language () { return "Javascript"; };
language () { return "javascript"; };
languageName () { return "Javascript"; };
async launch () { await this.pageLoad(); };
......
......@@ -31,7 +31,8 @@
*/
basthonModulesRoot () { return this.basthonRoot() + "/modules"; };
language () { return "Python"; };
language () { return "python3"; };
languageName () { return "Python 3"; };
/**
* What to do when loaded (private).
......
......@@ -18,7 +18,8 @@
this.execution_count = 0;
};
language () { return "SQL"; };
language () { return "sql"; };
languageName () { return "SQL"; };
async launch () {
await this.loadScript("https://cdnjs.cloudflare.com/ajax/libs/sql.js/1.5.0/sql-wasm.min.js");
......
......@@ -21,7 +21,7 @@
window.logs.push(message);
};
</script>
<script src="basthon-python.min.js"></script>
<script src="basthon-python3.min.js"></script>
</head>
<body>
<script>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment