Testing the availability of a module
farproc at gmail.com
Mon Dec 19 10:22:45 CET 2005
2005/12/19, Bo Peng <bpeng at rice.edu>:
> Dear list,
> Is there a better way than doing
> import aModule
> has_aModule = False
> has_aModule = True
> The main concern here is that loading aModule is unnecessary (and may
> take time).
> If loading aModule is unnecessary, the best way is not loading it atall.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list