calling system(command, '-echo') prints a new line for every update in progress bar
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I'm calling a python script that uses keras API which in turn calls tensfor flow functions. During the execution of the script, python prints out a progress bar. When the script is called from command window, it runs perfectly well but when I call it from matlab using 'system( command, '-echo')' the progress bar is printed in a new line every time an update happens instead of updating the same line.
Here is a snippet from the outout I get:
15744/531300 [..............................] - ETA: 33s
16480/531300 [..............................] - ETA: 33s
17376/531300 [..............................] - ETA: 33s
18304/531300 [>.............................] - ETA: 33s
19168/531300 [>.............................] - ETA: 33s
20064/531300 [>.............................] - ETA: 32s
21024/531300 [>.............................] - ETA: 32s
When I call system() without '-echo' nothing is printed out live but everything gets printed when the whole code stops execution which makes the progress bar pointless (since I don't see live updates).
I need to get the progress bar to be printed and updated on the same line instead of getting a new line for every update. Can someone help me fix that?
Thanks.
3 comentarios
Jan
el 19 de Mzo. de 2019
You can't. The backspace characters needed for this do not work, when a linebreak was submitted before. For a long time backspace characters did not work in Matlab's command window under Windows, such that these progress indication was working under Linux only, but I didn't test this in the last years.
I assume, you cannot fix the display of a progressbar, which is created through the text output of an external function.
Respuestas (0)
Ver también
Categorías
Más información sobre Call Python from MATLAB en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!