docs: def load_credentials(flnm):
      '''
      load_credentials(filename) yields the credentials stored in the given file as a tuple
        (key, secret). The file must contain <key>:<secret> on a single line. If the file does not
        contain valid credentials, then an exception is raised. Yields (key, secret).
  
      Optionally, if the file contains exactly two lines, then the key is taken as the first line and
      the secret is taken as the second line. This can be used if ':' is a valid character in either
      the key or secret for a particular service.
  
      Note that if the key/secret are more than 8kb in size, this function's behaviour is undefined.
      '''
      flnm = os.path.expanduser(os.path.expandvars(flnm))
      with open(flnm, 'r') as fl: dat = fl.read(1024 * 8)
      # see if its a 2-line file:
      try:              return str_to_credentials(dat)
      except Exception: raise ValueError('File %s does not contain a valid credential string' % flnm)