I'm currently rewriting a little wrapper program in python that I once wrote in C++. It extracts files from a file and boxes them in another format.
In C++ the output from the system commands I need to run was "real time" i.e the status bar and the percentage indicator of some commands where shown in real time. With python I get each 'percent' dumped on the screen individually (because I read it line by line). Here's an example: Thats how a status bar looks in the python version (this goes on until 100). In C++ it does update itself though.
| (02/100)\rImporting AVC-H264: | | (03/100)\rImporting AVC-H264: | | (04/100)\rImporting AVC-H264: |=
Thats the corresponding python code:
p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
for line in iter(p.stdout.readline, ""):
print line,
Any ideas on how I could make it look like in C++ ?