I think that's there because you just wanted to check if it was
available for import, implying that you didn't actually want to import
it right then.

On 22 May 2007 09:09:02 -0700, Paul Rubin
<"http://phr.cx"@nospam.invalid> wrote:
> Asun Friere <[EMAIL PROTECTED]> writes:
> > > howto check does module 'asdf' exist (is available for import) or no?
> > try :
> >   import asdf
> >   del asdf
> > except ImportError :
> >   print "module asdf not available"
> > else :
> >   print "module asdf available for loading"
>
> But this has a side effect: if asdf is already loaded, it deletes it.
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to