heinrichmartin <
martin....@frequentis.com> writes:
> On Sunday, July 8, 2018 at 4:44:05 PM UTC+2, Cecil Westerhof wrote:
>> I just have to wait until an update is necessary. ;-)
>
> Look into the man pages of pip. Most package managers provide command
> line options to make such checks more efficient and provide the result
> in the exit code. No need to parse the output, you could even run it in
> quiet mode.
>
> On the other hand, when parsing (or even interacting) with other
> processes, you might want to consider Expect.
My script determines what has to be updated and then does that. And I
really want to see what is happening. (I could make a switch for not
displaying anything for people who are not interested in the output.)
It determines for example that for pip3 pckgA, pckgB and pckgC need to
be updated. It then executes:
pip3 pckgA pckB pckC
Because this can take a while, I do not like to see all output at the
moment the command is ready, but see everything at the moment it comes
available. As if I put in the command myself. ;-)