0

I have, wrapped a static compiled python in my android project, and then executed a python script(webserver), program is running fine, but i cannot read the output/error stream, so that i have executed python3.4 -h which is reading fine by the program.

Process process = Runtime.getRuntime().exec(commandLine, envp,cwd);
readStream(process.getInputStream());
readStream(process.getErrorStream());
process.waitFor();

readStream() opens a new thread, what could be the issue ?

wpercy
  • 9,636
  • 4
  • 33
  • 45
Bijoy
  • 399
  • 2
  • 7
  • 15

1 Answers1

0

Problem was with python's bufferd stdout and stderr, i just added python3.4 -u to solve the issue, Refer How to flush output of Python print?

Community
  • 1
  • 1
Bijoy
  • 399
  • 2
  • 7
  • 15