[Tutor] Tutor Digest, Vol 51, Issue 23

"शंतनू "शंतनू
Sun May 11 13:37:13 CEST 2008


Hi Jatinder,
Please turn off caps lock.
On 11-May-08, at 4:54 PM, root wrote:

> Hi ,
> 	I AM TRYING FOR A PYTHON PROGRAM THAT WILL CHECK WHETHER {- PHP AND
> MYSQL -} ARE INSTALLED ON lINUX OR NOT AND IF THEY ARE NOT INSTALLED
> THEN THE SCRIPT WILL TO INSTALL IT.
>
> for this I am doing
>
> import sys
> import os
> import commands
> import sys
>
>
> 	commands_hash = {}
> 	commands_hash['php'] = {}
> 	commands_hash['php']['title'] = "***********PHP**************"
> 	commands_hash['php']['value'] = "rpm -qa *php*"
> 	commands_hash['mysql'] = {}
> 	commands_hash['mysql']['title'] = "***********MYSQL**************"
> 	commands_hash['mysql']['value'] = "rpm -qa *mysql*"
>
>
> this is checking whether PHP and MYSQL are installed but PLEASE TELL  
> ME
> HOW TO ENHANCE IT SO AS THE INSTALL IT IF NOT INSTALLED ALREADY.

Please check '-i' and '-U' options of rpm command.

regards,
shantanoo


More information about the Tutor mailing list