Next / Previous / Contents / Shipman's homepage

9.3. Location.lookupStaCode()

The argument is an alphabetic station code, not a station number. It must be uppercased before using it as a key to the self.staCodeMap dictionary.

baseclasses.py
# - - -   L o c a t i o n . l o o k u p S t a C o d e   - - -

    def lookupStaCode ( self, staCode ):
        """Find a station by its alphabetic code.
        """
        return  self.staCodeMap[staCode.upper()]