Next / Previous / Contents / NM Tech homepage

6.20. CBCData.getPhysio()

pycbc.py
# - - -   C B C D a t a . g e t P h y s i o

    def getPhysio(self, physioCode):
        '''Look up a physiographic stratum code.
        '''
        try:
            result = self.s.query(self.Physio).filter_by(
                         physio_code=physioCode).one()
            return result
        except exc.SQLAlchemyError, detail:
            raise KeyError("No such physio code, '%s': %s" %
                (physioCode, detail))