Spaces:
Running on Zero
Running on Zero
Download node_modules/python/example/app.js from Bellok/warbler-cda: direct link, hf CLI and curl.
- Browser
- Download file 463 Bytes
-
https://huggingface.co/spaces/Bellok/warbler-cda/resolve/refs%2Fpr%2F3/node_modules/python/example/app.js
- Command line
-
hf download hf://spaces/Bellok/warbler-cda@refs/pr/3/node_modules/python/example/app.js
-
curl -L -o app.js https://huggingface.co/spaces/Bellok/warbler-cda/resolve/refs%2Fpr%2F3/node_modules/python/example/app.js
463 Bytes
| var python = require('../lib/python').shell; | |
| var mycallback = function(err, data) { | |
| if (err) { | |
| console.error(err); | |
| } else { | |
| process.stdout.write(data + '\n>>> '); | |
| } | |
| }; | |
| process.stdout.write('Using Python from NodeJS\n>>> '); | |
| process.stdin.resume(); | |
| process.stdin.setEncoding('utf8'); | |
| process.stdin.on('data', function (chunk) { | |
| python(chunk, mycallback); | |
| }); | |
| process.stdin.on('end', function() { | |
| python('quit()'); | |
| }); | |