Page 1 of 1

[SOLVED] Testing if a package is installed

Published: January 10, 2019 - 5:18 PM
by Patrice_minagri
Hello,

could you help me find the Python instructions that test for the presence of a WAPT package on the workstation?

I know the `installed_softwares` function, but it only processes the application name from the list of installed applications. What I need is to determine whether or not a package is present by its name.

I'm a bit stuck here!

Thanks.

Patrice

Re: Testing if a package is installed

Published: January 10, 2019 - 5:25 PM
by htouvet

Code: Select all

def install():
    if WAPT.is_installed('tis-firefox'):
       print(u'Paquet firefox installé')

Re: Testing if a package is installed

Published: January 10, 2019 - 5:41 PM
by Patrice_minagri
Thank you so much !!!!