Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- const { spawn } = require('child_process');
- const python = spawn('python', ['-c', "import subprocess; subprocess.run(['path_to_your_exe_file'], check=True)"]);
- python.stdout.on('data', (data) => {
- console.log(`stdout: ${data}`);
- });
- python.stderr.on('data', (data) => {
- console.error(`stderr: ${data}`);
- });
- python.on('close', (code) => {
- console.log(`child process exited with code ${code}`);
- });
- <script>
Advertisement
Comments
-
- <script>
- const python = spawn('python', ['-c', 'import subprocess; subprocess.run(['path_to_your_exe_file'], check=True)']);
- </script>
Add Comment
Please, Sign In to add comment
Advertisement