I am running a python script from node JS application as
const { spawnSync } = require('child_process');
const pythonProcess = await spawnSync(python3, [
scriptFilePath,
'methodNameToExecute',
PathList.toString()
]);
const result = pythonProcess.stdout?.toString()?.trim();
The python script is running fine here and getting expected string output from python print method to here in result variable. But when result is too long i am getting truncated string result. Please guide me how to get full string even its too large string. Please guide if any limitation is there while passing string from python to node application.
maxBufferoption, see: Stdout buffer issue using node child_processspawnSync(python3, [...], { maxBuffer: 10000 * 1024 })