Get information from pext planes. This might or might not work, use with
    caution!

    Parameters:
    -----------

      lsp       : .lsp string

    Returns a list of dicts with information for all pext planes
320084
def getpexts(lsp):
    '''
    
    '''
    lines=lsp.split('\n');
    #unfortunately regex doesn't work here
    lns,planens = zip(
        *[ (i,int(re.search('^ *extract *([0-9]+)',line).group(1)))
           for i,line in enumerate(lines)
           if re.search('^ *extract *[0-9]+', line)]);
    if len(lns) == 0: return [];
    end = lns[-1];
    
    for i,line in enumerate(lines[end+1:]):
        if re.match(' *\[',line): break;
    end += i;
    lineranges = zip(lns,(lns+(end,))[1:]);
    planes=dict()
    for (i,end),plane in zip(lineranges,planens):
        d=dict();
        labels = [
            'species',
            'direction',
            'position',];
        datarx = [
            '^ *species *([0-9]+)',
            '^ *direction *([xXyYzZ])',
            '^ *at *(.*)',];
        convs  = [
            lambda s: int(s),
            lambda i: i,
            lambda s: np.array(
                map(float,s.split(' '))),
        ];
        for line in lines[i:end]:
            for label,rx,conv in zip(labels,datarx,convs):
                if re.match(rx,line):
                    d[label]=conv(re.match(rx,line).group(1));
                pass
            pass
        planes[plane] = d;
    return planes;
1044745
def ls(self):
        
        width = max([len(x) for x in self.namespace.keys()])
        for key, value in sorted(self.namespace.items()):
            if key == "_":
                continue
            info = ""
            if (isinstance(value, dict) or
                isinstance(value, list) or key == "services"):
                info = "data"
            elif type(value).__name__ == "module":
                info = value.__name__
            elif type(value).__name__ == "function":
                info = "%s.%s" % (value.__module__, value.__name__)
            elif type(value).__name__ == "instance":
                info = "%s.%s" % (value.__module__, value.__class__.__name__)
            else:
                info = "%s.%s.%s" % (
                    value.im_class.__module__, value.im_class.__name__, key)
            print "\t%s - %s" % (key.ljust(width), info)
11484
def _extract_line_features(self):
        
        for line in self.line_iterator:
            m = re.search(GENERIC_IPV4_REGEX, line)

            data = {
                'raw': line
            }

            if m:
                data['ip'] = m.group('ip')

            self.parsed_lines.append(data)
574158
def show_info(self):
        
        sender = self.sender()
        tree = sender.parent()
        index = tree.selectedIndexes()
        info = ''
        if index != []:
            index = index[0]
            name = str(index.model().itemFromIndex(index).text())
            self.selected_element_name = name



            if name in self.elements_old:
                info = self.elements_old[name].__doc__

            #TODO: check if this is portable
            elif name in self.elements_from_file:
                class_name = self.elements_from_file[name]['class']
                if 'filepath' in self.elements_from_file[name]:
                    filepath = self.elements_from_file[name]['filepath']
                if 'info' in self.elements_from_file[name]:
                    info = self.elements_from_file[name]['info']
                #
                # path_to_src_scripts = filepath[:filepath.find('\\pylabcontrol\\scripts\\')]
                # module_name = path_to_src_scripts[path_to_src_scripts.rfind('\\')+1:]
                # module = __import__('{:s}.pylabcontrol.{:s}'.format(module_name, self.elements_type), fromlist=[class_name])
                # info = getattr(module, class_name).__doc__



            if info is None:
                info = name

            if tree == self.tree_infile:
                self.lbl_info.setText(info)
                self.tree_loaded.clearSelection()

            elif tree == self.tree_loaded:
                self.lbl_info.setText(info)
                self.tree_infile.clearSelection()
361825
def pelix_infos(self):
        
        framework = self.__context.get_framework()
        return {
            "version": framework.get_version(),
            "properties": framework.get_properties(),
        }
995488
def GetPageInfo(self):
        

        return self.first_tab, self.last_tab, self.first_tab, self.last_tab
1334087
def get_taf_flight_rules(lines: [dict]) -> [dict]:  # type: ignore
    
    for i, line in enumerate(lines):
        temp_vis, temp_cloud = line['visibility'], line['clouds']
        for report in reversed(lines[:i]):
            if not _is_tempo_or_prob(report['type']):
                if temp_vis == '':
                    temp_vis = report['visibility']
                if 'SKC' in report['other'] or 'CLR' in report['other']:
                    temp_cloud = 'temp-clear'
                elif temp_cloud == []:
                    temp_cloud = report['clouds']
                if temp_vis != '' and temp_cloud != []:
                    break
        if temp_cloud == 'temp-clear':
            temp_cloud = []
        line['flight_rules'] = FLIGHT_RULES[get_flight_rules(temp_vis, get_ceiling(temp_cloud))]
    return lines
208730
def info(name, root=None):
    '''
    
    '''
    if root is not None:
        getspnam = functools.partial(_getspnam, root=root)
    else:
        getspnam = functools.partial(spwd.getspnam)

    try:
        data = getspnam(name)
        ret = {
            'name': data.sp_namp if hasattr(data, 'sp_namp') else data.sp_nam,
            'passwd': data.sp_pwdp if hasattr(data, 'sp_pwdp') else data.sp_pwd,
            'lstchg': data.sp_lstchg,
            'min': data.sp_min,
            'max': data.sp_max,
            'warn': data.sp_warn,
            'inact': data.sp_inact,
            'expire': data.sp_expire}
    except KeyError:
        return {
            'name': '',
            'passwd': '',
            'lstchg': '',
            'min': '',
            'max': '',
            'warn': '',
            'inact': '',
            'expire': ''}
    return ret
294513
def get_server_info(self):
        
        # NB: can't do it this way due to recursion
        # codec = self._get_codec(ttb_supported=False)
        codec = PbufCodec()
        msg = Msg(riak.pb.messages.MSG_CODE_GET_SERVER_INFO_REQ, None,
                  riak.pb.messages.MSG_CODE_GET_SERVER_INFO_RESP)
        resp_code, resp = self._request(msg, codec)
        return codec.decode_get_server_info(resp)
723375
def get_host_info():
    
    host_info = {}
    for k, v in host_info_gatherers.items():
        try:
            host_info[k] = v()
        except IgnoreHostInfo:
            pass
    return host_info
499844
def _get_name_info(name_index, name_list):
    
    argval = name_index
    if (name_list is not None
        # PyPY seems to "optimize" out constant names,
        # so we need for that:
        and name_index < len(name_list)):
        argval = name_list[name_index]
        argrepr = argval
    else:
        argrepr = repr(argval)
    return argval, argrepr
5633
def get_lists(self):
        
        url = self.build_url(self._endpoints.get('get_lists'))

        response = self.con.get(url)
        if not response:
            return []

        data = response.json()

        return [self.list_constructor(parent=self, **{self._cloud_data_key: lst}) for lst in data.get('value', [])]
1083395
def list_data(self):
        
        if self._stype != 'default':
            raise RuntimeError("Cannot return copies of Parameter '%s' on all contexts via " \
                               "list_data() because its storage type is %s. Please use " \
                               "row_sparse_data() instead." % (self.name, self._stype))
        return self._check_and_get(self._data, list)
1045386
def airport_codes():
	
	html = requests.get(URL).text
	data_block = _find_data_block(html)

	return _airport_codes_from_data_block(data_block)
1208974
def get_pages(self):
        
        resp = self._client._call('GetProxies', proto.GetProxiesRequest())
        return {i.route: ProxiedPage(i.route, i.target,
                                     i.link_name if i.link_name else None,
                                     self.address, self.proxy_prefix)
                for i in resp.proxy}
333153
def getMenu(self):
        
        data = self._retrieve('')
        info_list = []
        for line in data.splitlines():
            mobj = re.match('^\s*(\S.*\S)\s*\t\s*(\S.*\S)\s*\t\s*(\S.*\S)$', line)
            if mobj:
                info_list.append(mobj.groups())
        return info_list
247430
def get(self, path, local_destination):
        
        return list(self.get_bite().copyToLocal(self.list_path(path),
                                                local_destination))