=== 'win32' ? 'powershell.exe' : 'bash';
var ptyProcess = pty.spawn(shell, [], {
name: 'xterm-color',
cols: 80,
rows: 30,
cwd: process.env.HOME,
env: process.env
});
ptyProcess.on('data', function(data) {
process.stdout.write(data);
});
ptyProcess.write('cd home\r');
ptyProcess.write('python3 x.py\r');
ptyProcess.write('6\r');
ptyProcess.write('8\r');
how to write a number to node-pty terminal
No errors no help oop
Обсуждают сегодня