def listLinesWithKeyfromOnlineText(url, key):
    """List lines from text file located at url, with key.

   :param url: url
   :type url: string
   :param key: key word
   :type key: string
   :returns: list of lines
   :rtype: list

   :Example:

   >>> from westpy import * 
   >>> url = "http://www.quantum-simulation.org/potentials/sg15_oncv/upf/Si_ONCV_PBE-1.1.upf"
   >>> key = "z_valence"
   >>> l = listLinesWithKeyfromOnlineText(url,key)
   >>> print(l) 
   ['       z_valence="    4.00"'] 

   .. note:: Can be used to grep values from a UPF file.
   """
    from urllib.request import urlopen
    import re
    data = urlopen(url)
    greplist = []
    for line in data:
        if key in str(line):
            greplist.append(line)
    return greplist
