I have created a python interface for the yad program. What the code basically does is that, it generates a string which gets passed to the yad
program using pythons subprocess
and/or pexpect
module and executes it
Now, Im facing a weird bug where I am trying to display a simple [multi]progress bar and update the bar with a certain value like this:
import yad, time
yad = yad.YAD()
x = yad.Progress(autoclose=True) # yad.MultiProgress(autoclose=True)
for i in range(0,105,5):
print(i)
x(i,msg=str(i)+"% done")
time.sleep(0.5)
The problem is that, in python 2.7, it works fine(updates the bar, and closes after wards), But when it comes to python 3.4, it does not work(shows the bar, but does not update, even though the for
loop prints the numbers).
Im trying to figure out what the problem is with my interface. The functions are written in such a way that, it should update the bar, but for some reason its not working in python 3.4.
Kindly help me with this problem. I am not able to figure out where the bug is.
Edit : x
is a function that is returned as output when we call the yad.Progress()
. Using the x
, we can write some standard input to the yad. The shell equivalent of the code would be something like this:
yad --progress --auto-close
> 5
> # 5% done
...