Why does print run only after executing while loop is done in Jython and not during the execution of the while loop

133 Views Asked by At

I already tried using sys.stdout.write(output) sys.stdout.flush(), The Script is running in Jython using JMX, in Python its ok

Just print after the program is done and not when the infinite while is executing

while True:
  for enlace in enlaces:
    try:
     print( monitor.status("proc", "stat" + enlace))
     print("----------------------------------------------------")
    except Error, e:
      print ("Script Failed, " + e.value )

  time.sleep(1)
0

There are 0 best solutions below