Creating methods depending on packages that have been installed



Dear All,

What is the best way of creating methods depending on the packages that have
been installed.

A silly example is

try:
import somepack
class hello:
def __init__(self):
print 'hi'
def some(self):
print 'some'
except:
class hello:
def __init__(self):
print 'hi'

This is obviously not what I want - since it looks ugly and I wish to test
for lots packages.

Any ideas?

Thanks

Colin



.



Relevant Pages

  • Massages on Royal Caribbean
    ... cost or are there a variety of spa packages... ... that sort of thing? ... Prev by Date: ...
    (rec.travel.cruises)
  • Do You Want A New Xbox 360 Premium Package? & 2 Games?
    ... order 3 packages $500 each alot cheaper then ebay ... Prev by Date: ...
    (alt.games.video.xbox)
  • Re: The first echo box....
    ... a funnier visual is when the cleanup man at the truckstop polices your ... Prev by Date: ...
    (rec.radio.cb)
  • Re: Magic 5 or 6
    ... Sparemint for the updates to the latest kernels and packages: ... Coda. ... Prev by Date: ...
    (comp.sys.atari.st)
  • delivery confirmation
    ... I cannot use it for firstclass envelopes, I can only use it for ... packages now. ... that sucks. ... Prev by Date: ...
    (alt.marketing.online.ebay)