I have a Python script that prints numbers to the Shell
, for example: 1/20 or 5/50, and I would like to be able to catch these numbers from the Shell
.
I use a Timer
that executes each 500 ms Shell1.Poll
inside the Action
event, and I use the DataAvailable
event of the Shell1
to catch the output with Me.ReadAll
. Unfortunately, this is not working. I don’t get any output while the Python script is running.
Shell1.Execute("main.py C:\list.txt")
is called inside a button Pressed
event. Before Shell1.Execute
, I start the Timer with Timer1.RunMode = Timer.RunModes.Multiple
.
My goal is to use the numbers from the output to update a progress bar in my application. 1/20 means for example 5% progressed, 5/50 means 10% progressed.
What am I doing wrong?