Re: look for a module without import it

2006-07-14 Thread Michele Petrazzo
Fredrik Lundh wrote: >> more module.py > print "I'M MODULE!" > >> python import imp imp.find_module("os") It was! Michele -- http://mail.python.org/mailman/listinfo/python-list

Re: look for a module without import it

2006-07-14 Thread Fredrik Lundh
Michele Petrazzo wrote: > I have to know if a module are present on the system, but I don't want > to import it. Only know if it is present. > > I think that a loop on the site-packages directory can do the work, but > is there another solution? > more module.py print "I'M MODULE!" > python >>>

look for a module without import it

2006-07-14 Thread Michele Petrazzo
Hi list, I have to know if a module are present on the system, but I don't want to import it. Only know if it is present. I think that a loop on the site-packages directory can do the work, but is there another solution? Thanks, Michele -- http://mail.python.org/mailman/listinfo/python-list