node.js spawn stdout string broken when received
问题 I have the following python code (script.py): import sys import numpy as np from scipy import stats def generateBeta() : fit = (0.075252656968743836, 498.49505071718869, 9.9999999999999991e-05, 0.18136881492296397) rnd = stats.beta.rvs(fit[0], fit[1], fit[2], fit[3], 581) rndStr = "" for i in rnd: rndStr += str(i) + ',' print rndStr[0:len(rndStr)-1] if __name__ =='__main__' : generateBeta() When running "python script.py" I get something like: 0.000461650100253,0.000100731728317,0