Very similar to the .run4() method.
# - - - S p e c i e s S e a r c h e r . r u n 6 - - -
def run6 ( self ):
"""Search for a 6-letter species code.
"""
See Section 13.2, “BaseSpeciesSet.lookupSpec6()”.
#-- 1 --
# [ if self.speciesSet has a 6-letter code matching
# self.target, case-insensitive ->
# species := the Species object with that code
# else ->
# sys.stderr +:= error message(s)
# stop execution ]
try:
species = self.speciesSet.lookupSpec6 ( self.target )
except KeyError:
print "*** No such 6-letter code: '%s'" % self.target
sys.exit(1)
#-- 2 --
# [ sys.stdout +:= species in string form ]
print " %s" % species