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

2014-12-12 Thread Chris Warrick
On Dec 12, 2014 11:56 AM, "hugocoolens" wrote: > > On Monday, December 8, 2014 9:00:13 PM UTC+1, sohca...@gmail.com wrote: > > On Monday, December 8, 2014 10:46:47 AM UTC-8, Jean-Michel Pichavant wrote: > > > - Original Message - > > > > From: sohcahto...@gmail.com > > > > try: > > > >

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

2014-12-12 Thread hugocoolens
On Monday, December 8, 2014 9:00:13 PM UTC+1, sohca...@gmail.com wrote: > On Monday, December 8, 2014 10:46:47 AM UTC-8, Jean-Michel Pichavant wrote: > > - Original Message - > > > From: sohcahto...@gmail.com > > > try: > > > import someModule > > > except ImportError: > > > print "

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

2014-12-09 Thread sohcahtoa82
To: hugocoolens On Monday, December 8, 2014 9:44:50 AM UTC-8, hugocoolens wrote: > 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 ins

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

2014-12-09 Thread hugocoolens
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 -->ex

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

2014-12-09 Thread sohcahtoa82
To: Jean-Michel Pichavant On Monday, December 8, 2014 10:46:47 AM UTC-8, Jean-Michel Pichavant wrote: > - Original Message - > > From: sohcahto...@gmail.com > > try: > > import someModule > > except ImportError: > > print "Module is missing" > > # handle it! > > > > Just make

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

2014-12-08 Thread sohcahtoa82
On Monday, December 8, 2014 10:46:47 AM UTC-8, Jean-Michel Pichavant wrote: > - Original Message - > > From: sohcahto...@gmail.com > > try: > > import someModule > > except ImportError: > > print "Module is missing" > > # handle it! > > > > Just make sure to attempt to import i

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

2014-12-08 Thread Jean-Michel Pichavant
- Original Message - > From: sohcahto...@gmail.com > try: > import someModule > except ImportError: > print "Module is missing" > # handle it! > > Just make sure to attempt to import it again after making the call to > pip to install it. Note that ImportError may be raised for

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

2014-12-08 Thread sohcahtoa82
On Monday, December 8, 2014 9:44:50 AM UTC-8, hugocoolens wrote: > 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

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

2014-12-08 Thread hugocoolens
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 -->ex