[newbie] how to make program suggest to install missing modules

hugocoolens hugocoolens at gmail.com
Mon Dec 8 12:44:38 EST 2014


I'd like to add the following to a python-program:

when a module (take rtlsdr as an example) is not installed on the system I'd like to ask the program something like:

module rtlsdr is missing, shall I install it? y or n
if n -->sorry but then I can't run this program and quit program
if y -->execute this command: 
os.system(sudo pip install pyrtlsdr)

continue program

can anyone here show me how to perform this properly?

thanks in advance
hugo




More information about the Python-list mailing list