You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nexpect.spawn("node")
.expect(">")
.sendline("console.log('testing')")
.expect("testing")
.sendline("process.exit()")
.run(function (err) {
if (!err) {
console.log("node process started, console logged, process exited");
}
else {
console.log(err);
}
});
but the output is nothong!
I don't understanding why use the "node --interactive" instead of "node" ?
and I want to know How to use the nexpect.spawn() method about python?
For example:
var nexpect = require('../lib/nexpect');
nexpect.spawn("python")
.expect("...")
...
The text was updated successfully, but these errors were encountered:
I edit the example node.js like this:
var nexpect = require('../lib/nexpect');
nexpect.spawn("node")
.expect(">")
.sendline("console.log('testing')")
.expect("testing")
.sendline("process.exit()")
.run(function (err) {
if (!err) {
console.log("node process started, console logged, process exited");
}
else {
console.log(err);
}
});
but the output is nothong!
I don't understanding why use the "node --interactive" instead of "node" ?
and I want to know How to use the nexpect.spawn() method about python?
For example:
var nexpect = require('../lib/nexpect');
nexpect.spawn("python")
.expect("...")
...
The text was updated successfully, but these errors were encountered: