try: import <modulename> except: <install module> import <modulename>
--- Ed Hotchkiss <[EMAIL PROTECTED]> wrote: > i have a generic script that is using several > modules on windows and linux > boxes. i need to have the scripts test if a module > is installed, and then if > not - then to install the module. can anyone give me > a headsup on how to > test for a module, returning something to indicate > whether or not it is > installed, then after that executing file to install > the module.? just > somewhere to start would be helpful! thanks in > advance. > > -- > edward hotchkiss > > -- > http://mail.python.org/mailman/listinfo/python-list __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor