bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
def _prepareVersionMapping(self): """ Create a mapping that will make it possible to easily provide the latest version of each plugin. """ self.latest_mapping = {} for categ in self._component.categories_interfaces.keys(): self.latest_mapping[categ] = [] | def _prepareVersionMapping(self): """ Create a mapping that will make it possible to easily provide the latest version of each plugin. """ self._attic = {} for categ in self.getCategories(): self._attic[categ] = [] | 447,700 |
def _prepareVersionMapping(self): """ Create a mapping that will make it possible to easily provide the latest version of each plugin. """ self.latest_mapping = {} for categ in self._component.categories_interfaces.keys(): self.latest_mapping[categ] = [] | def _prepareVersionMapping(self): """ Create a mapping that will make it possible to easily provide the latest version of each plugin. """ self.latest_mapping = {} for categ in self._component.categories_interfaces.keys(): self.latest_mapping[categ] = [] | 447,701 |
def getLatestPluginsOfCategory(self,category_name): """ Return the list of all plugins belonging to a category. """ | def getLatestPluginsOfCategory(self,category_name): """ Return the list of all plugins belonging to a category. """ | 447,702 |
def loadPlugins(self, callback=None): """ Load the candidate plugins that have been identified through a previous call to locatePlugins. | defloadPlugins(self,callback=None):"""LoadthecandidatepluginsthathavebeenidentifiedthroughapreviouscalltolocatePlugins. | 447,703 |
def loadPlugins(self, callback=None): """ Load the candidate plugins that have been identified through a previous call to locatePlugins. | def loadPlugins(self, callback=None): """ Load the candidate plugins that have been identified through a previous call to locatePlugins. | 447,704 |
def loadPlugins(self, callback=None): """ Load the candidate plugins that have been identified through a previous call to locatePlugins. | def loadPlugins(self, callback=None): """ Load the candidate plugins that have been identified through a previous call to locatePlugins. | 447,705 |
def __init__(self,elem,namespace=DEFAULT_OWS_NAMESPACE): self.name = elem.attrib['name'] self.formatOptions = ['text/xml'] methods = [] for verb in elem.findall(util.nspath('DCP/HTTP/*', namespace)): methods.append((verb.tag, {'url': verb.attrib[util.nspath('href', XLINK_NAMESPACE)]})) self.methods = dict(methods) | def __init__(self,elem,namespace=DEFAULT_OWS_NAMESPACE): self.name = elem.attrib['name'] self.formatOptions = ['text/xml'] methods = [] for verb in elem.findall(util.nspath('DCP/HTTP/*', namespace)): methods.append((verb.tag, {'url': verb.attrib[util.nspath('href', XLINK_NAMESPACE)]})) self.methods = dict(methods) | 447,706 |
def __init__(self, elem, namespace=DEFAULT_OWS_NAMESPACE): self.minx = None self.miny = None self.maxx = None self.maxy = None | def __init__(self, elem, namespace=DEFAULT_OWS_NAMESPACE): self.minx = None self.miny = None self.maxx = None self.maxy = None | 447,707 |
def __init__(self, elem, namespace=DEFAULT_OWS_NAMESPACE): self.minx = None self.miny = None self.maxx = None self.maxy = None | def __init__(self, elem, namespace=DEFAULT_OWS_NAMESPACE): self.minx = None self.miny = None self.maxx = None self.maxy = None | 447,708 |
def set(self, parent=False, qtype=None, keywords=[], typenames='csw:Record', propertyname='AnyText', bbox=None): """ | def set(self, parent=False, qtype=None, keywords=[], typenames='csw:Record', propertyname='AnyText', bbox=None): """ | 447,709 |
def openURL(url_base, data, method='Get', cookies=None, username=None, password=None): ''' function to open urls - wrapper around urllib2.urlopen but with additional checks for OGC service exceptions and url formatting, also handles cookies and simple user password authentication''' url_base.strip() lastchar = url_base... | def openURL(url_base, data, method='Get', cookies=None, username=None, password=None): ''' function to open urls - wrapper around urllib2.urlopen but with additional checks for OGC service exceptions and url formatting, also handles cookies and simple user password authentication''' url_base.strip() lastchar = url_base... | 447,710 |
def openURL(url_base, data, method='Get', cookies=None, username=None, password=None): ''' function to open urls - wrapper around urllib2.urlopen but with additional checks for OGC service exceptions and url formatting, also handles cookies and simple user password authentication''' url_base.strip() lastchar = url_base... | def openURL(url_base, data, method='Get', cookies=None, username=None, password=None): ''' function to open urls - wrapper around urllib2.urlopen but with additional checks for OGC service exceptions and url formatting, also handles cookies and simple user password authentication''' url_base.strip() lastchar = url_base... | 447,711 |
def transaction(self, ttype=None, typename='csw:Record', record=None, propertyname=None, propertyvalue=None, bbox=None, keywords=[], cql=None): """ | def transaction(self, ttype=None, typename='csw:Record', record=None, propertyname=None, propertyvalue=None, bbox=None, keywords=[], cql=None): """ | 447,712 |
def _parseinsertresult(self): self.results['inserted'] = [] for i in self._exml.findall(util.nspath('TransactionResponse/InsertResult', namespaces['csw'])): for j in i.findall(util.nspath('BriefRecord', namespaces['csw']) + '/' + util.nspath('identifier', namespaces['dc'])): self.results['inserted'].append(util.testXML... | def _parseinsertresult(self): self.results['inserted'] = [] for i in self._exml.findall(util.nspath('InsertResult', namespaces['csw'])): for j in i.findall(util.nspath('BriefRecord', namespaces['csw']) + '/' + util.nspath('identifier', namespaces['dc'])): self.results['inserted'].append(util.testXMLValue(j)) | 447,713 |
def _parsetransactionsummary(self): val = self._exml.find(util.nspath('TransactionResponse/TransactionSummary', namespaces['csw'])) if val is not None: id = val.attrib.get('requestId') self.results['requestid'] = util.testXMLValue(id, True) ts = val.find(util.nspath('totalInserted', namespaces['csw'])) self.results['in... | def _parsetransactionsummary(self): val = self._exml.find(util.nspath('TransactionSummary', namespaces['csw'])) if val is not None: id = val.attrib.get('requestId') self.results['requestid'] = util.testXMLValue(id, True) ts = val.find(util.nspath('totalInserted', namespaces['csw'])) self.results['inserted'] = util.test... | 447,714 |
def openURL(url_base, data, method='Get', cookies=None, username=None, password=None): ''' function to open urls - wrapper around urllib2.urlopen but with additional checks for OGC service exceptions and url formatting, also handles cookies and simple user password authentication''' url_base.strip() lastchar = url_base... | def openURL(url_base, data, method='Get', cookies=None, username=None, password=None): ''' function to open urls - wrapper around urllib2.urlopen but with additional checks for OGC service exceptions and url formatting, also handles cookies and simple user password authentication''' url_base.strip() lastchar = url_base... | 447,715 |
def openURL(url_base, data, method='Get', cookies=None, username=None, password=None): ''' function to open urls - wrapper around urllib2.urlopen but with additional checks for OGC service exceptions and url formatting, also handles cookies and simple user password authentication''' url_base.strip() lastchar = url_base... | def openURL(url_base, data, method='Get', cookies=None, username=None, password=None): ''' function to open urls - wrapper around urllib2.urlopen but with additional checks for OGC service exceptions and url formatting, also handles cookies and simple user password authentication''' url_base.strip() lastchar = url_base... | 447,716 |
def _buildMetadata(self): ''' set up capabilities metadata objects ''' #serviceIdentification metadata serviceelem=self._capabilities.find('Service') self.identification=ServiceIdentification(serviceelem, self.version) #serviceProvider metadata self.provider=ServiceProvider(serviceelem) #serviceOperations metadata s... | def _buildMetadata(self): ''' set up capabilities metadata objects ''' #serviceIdentification metadata serviceelem=self._capabilities.find('Service') self.identification=ServiceIdentification(serviceelem, self.version) #serviceProvider metadata self.provider=ServiceProvider(serviceelem) #serviceOperations metadata s... | 447,717 |
def __init__(self, elem, parent=None): self.parent = parent if elem.tag != 'Layer': raise ValueError('%s should be a Layer' % (elem,)) for key in ('Name', 'Title'): val = elem.find(key) if val is not None: setattr(self, key.lower(), val.text.strip()) else: setattr(self, key.lower(), None) self.id=self.name #conform to ... | def __init__(self, elem, parent=None): self.parent = parent if elem.tag != 'Layer': raise ValueError('%s should be a Layer' % (elem,)) for key in ('Name', 'Title'): val = elem.find(key) if val is not None: setattr(self, key.lower(), val.text.strip()) else: setattr(self, key.lower(), 'unnamed_layer') self.id=self.name #... | 447,718 |
def _buildMetadata(self): ''' set up capabilities metadata objects ''' #serviceIdentification metadata serviceelem=self._capabilities.find('Service') self.identification=ServiceIdentification(serviceelem, self.version) #serviceProvider metadata self.provider=ServiceProvider(serviceelem) #serviceOperations metadata s... | def _buildMetadata(self): ''' set up capabilities metadata objects ''' #serviceIdentification metadata serviceelem=self._capabilities.find('Service') self.identification=ServiceIdentification(serviceelem, self.version) #serviceProvider metadata self.provider=ServiceProvider(serviceelem) #serviceOperations metadata s... | 447,719 |
def __init__(self, elem, parent=None): self.parent = parent if elem.tag != 'Layer': raise ValueError('%s should be a Layer' % (elem,)) for key in ('Name', 'Title'): val = elem.find(key) if val is not None: setattr(self, key.lower(), val.text.strip()) else: setattr(self, key.lower(), 'unnamed_layer') self.id=self.name #... | def __init__(self, elem, parent=None, index=0): if elem.tag != 'Layer': raise ValueError('%s should be a Layer' % (elem,)) for key in ('Name', 'Title'): val = elem.find(key) if val is not None: setattr(self, key.lower(), val.text.strip()) else: setattr(self, key.lower(), 'unnamed_layer') self.id=self.name #conform to n... | 447,720 |
def __init__(self, elem, parent=None): self.parent = parent if elem.tag != 'Layer': raise ValueError('%s should be a Layer' % (elem,)) for key in ('Name', 'Title'): val = elem.find(key) if val is not None: setattr(self, key.lower(), val.text.strip()) else: setattr(self, key.lower(), 'unnamed_layer') self.id=self.name #... | def __init__(self, elem, parent=None): self.parent = parent if elem.tag != 'Layer': raise ValueError('%s should be a Layer' % (elem,)) self.parent = parent if parent: self.index = "%s.%d" % (parent.index, index) else: self.index = str(index) self.title = elem.find('Title').text.strip() name = elem.find('Name') self.... | 447,721 |
def transaction(self, ttype=None, typename='csw:Record', record=None, propertyname=None, propertyvalue=None, bbox=None, keywords=[], cql=None): """ | def transaction(self, ttype=None, typename='csw:Record', record=None, propertyname=None, propertyvalue=None, bbox=None, keywords=[], cql=None): """ | 447,722 |
def _parseinsertresult(self): self.results['inserted'] = [] for i in self._exml.findall(util.nspath('TransactionResponse/InsertResult', namespaces['csw'])): for j in i.findall(util.nspath('BriefRecord', namespaces['csw']) + '/' + util.nspath('identifier', namespaces['dc'])): self.results['inserted'].append(util.testXML... | def _parseinsertresult(self): self.results['inserted'] = [] for i in self._exml.findall(util.nspath('InsertResult', namespaces['csw'])): for j in i.findall(util.nspath('BriefRecord', namespaces['csw']) + '/' + util.nspath('identifier', namespaces['dc'])): self.results['inserted'].append(util.testXMLValue(j)) | 447,723 |
def _parsetransactionsummary(self): val = self._exml.find(util.nspath('TransactionResponse/TransactionSummary', namespaces['csw'])) if val is not None: id = val.attrib.get('requestId') self.results['requestid'] = util.testXMLValue(id, True) ts = val.find(util.nspath('totalInserted', namespaces['csw'])) self.results['in... | def _parsetransactionsummary(self): val = self._exml.find(util.nspath('TransactionSummary', namespaces['csw'])) if val is not None: id = val.attrib.get('requestId') self.results['requestid'] = util.testXMLValue(id, True) ts = val.find(util.nspath('totalInserted', namespaces['csw'])) self.results['inserted'] = util.test... | 447,724 |
def __init__(self, md): val = md.find('idinfo/datasetid') self.datasetid = util.testXMLValue(val) | def __init__(self, md): val = md.find('idinfo/datasetid') self.datasetid = util.testXMLValue(val) | 447,725 |
def __init__(self, elem, parent=None): self.parent = parent if elem.tag != 'Layer': raise ValueError('%s should be a Layer' % (elem,)) for key in ('Name', 'Title', 'Attribution'): val = elem.find(key) if val is not None: setattr(self, key.lower(), val.text.strip()) else: setattr(self, key.lower(), None) self.id=self.na... | def __init__(self, elem, parent=None): self.parent = parent if elem.tag != 'Layer': raise ValueError('%s should be a Layer' % (elem,)) for key in ('Name', 'Title'): val = elem.find(key) if val is not None: setattr(self, key.lower(), val.text.strip()) else: setattr(self, key.lower(), None) self.id=self.name #conform to ... | 447,726 |
def __init__(self, elem, parent=None): self.parent = parent if elem.tag != 'Layer': raise ValueError('%s should be a Layer' % (elem,)) for key in ('Name', 'Title', 'Attribution'): val = elem.find(key) if val is not None: setattr(self, key.lower(), val.text.strip()) else: setattr(self, key.lower(), None) self.id=self.na... | def attribution = elem.find('Attribution') if attribution is not None: self.attribution = dict() title = attribution.find('Title') url = attribution.find('OnlineResource') logo = attribution.find('LogoURL') if title is not None: self.attribution['title'] = title.text if url is not None: self.attribution['url'] = url.at... | 447,727 |
def openURL(url_base, data, method='Get', cookies=None, username=None, password=None): ''' function to open urls - wrapper around urllib2.urlopen but with additional checks for OGC service exceptions and url formatting, also handles cookies and simple user password authentication''' url_base.strip() lastchar = url_base... | def openURL(url_base, data, method='Get', cookies=None, username=None, password=None): ''' function to open urls - wrapper around urllib2.urlopen but with additional checks for OGC service exceptions and url formatting, also handles cookies and simple user password authentication''' url_base.strip() lastchar = url_base... | 447,728 |
def openURL(url_base, data, method='Get', cookies=None, username=None, password=None): ''' function to open urls - wrapper around urllib2.urlopen but with additional checks for OGC service exceptions and url formatting, also handles cookies and simple user password authentication''' url_base.strip() lastchar = url_base... | def openURL(url_base, data, method='Get', cookies=None, username=None, password=None): ''' function to open urls - wrapper around urllib2.urlopen but with additional checks for OGC service exceptions and url formatting, also handles cookies and simple user password authentication''' url_base.strip() lastchar = url_base... | 447,729 |
def __init__(self,elem,namespace=DEFAULT_OWS_NAMESPACE): self.name = elem.attrib['name'] self.formatOptions = ['text/xml'] methods = [] for verb in elem.findall(util.nspath('DCP/HTTP/*', namespace)): methods.append((verb.tag, {'url': verb.attrib[util.nspath('href', XLINK_NAMESPACE)]})) self.methods = dict(methods) | def __init__(self,elem,namespace=DEFAULT_OWS_NAMESPACE): self.name = elem.attrib['name'] self.formatOptions = ['text/xml'] methods = [] for verb in elem.findall(util.nspath('DCP/HTTP/*', namespace)): methods.append((verb.tag, {'url': verb.attrib[util.nspath('href', XLINK_NAMESPACE)]})) self.methods = dict(methods) | 447,730 |
def __init__(self, elem, namespace=DEFAULT_OWS_NAMESPACE): self.minx = None self.miny = None self.maxx = None self.maxy = None | def __init__(self, elem, namespace=DEFAULT_OWS_NAMESPACE): self.minx = None self.miny = None self.maxx = None self.maxy = None | 447,731 |
def __init__(self, elem, namespace=DEFAULT_OWS_NAMESPACE): self.minx = None self.miny = None self.maxx = None self.maxy = None | def __init__(self, elem, namespace=DEFAULT_OWS_NAMESPACE): self.minx = None self.miny = None self.maxx = None self.maxy = None | 447,732 |
def set(self, parent=False, qtype=None, keywords=[], typenames='csw:Record', propertyname='AnyText', bbox=None): """ | def set(self, parent=False, qtype=None, keywords=[], typenames='csw:Record', propertyname='AnyText', bbox=None): """ | 447,733 |
def _buildMetadata(self): ''' set up capabilities metadata objects ''' #serviceIdentification metadata serviceelem=self._capabilities.find('Service') self.identification=ServiceIdentification(serviceelem, self.version) #serviceProvider metadata self.provider=ServiceProvider(serviceelem) #serviceOperations metadata s... | def _buildMetadata(self): ''' set up capabilities metadata objects ''' #serviceIdentification metadata serviceelem=self._capabilities.find('Service') self.identification=ServiceIdentification(serviceelem, self.version) #serviceProvider metadata self.provider=ServiceProvider(serviceelem) #serviceOperations metadata s... | 447,734 |
def _buildMetadata(self): ''' set up capabilities metadata objects ''' #serviceIdentification metadata serviceelem=self._capabilities.find('Service') self.identification=ServiceIdentification(serviceelem, self.version) #serviceProvider metadata self.provider=ServiceProvider(serviceelem) #serviceOperations metadata s... | def _buildMetadata(self): ''' set up capabilities metadata objects ''' #serviceIdentification metadata serviceelem=self._capabilities.find('Service') self.identification=ServiceIdentification(serviceelem, self.version) #serviceProvider metadata self.provider=ServiceProvider(serviceelem) #serviceOperations metadata s... | 447,735 |
def __init__(self, elem, parent=None): self.parent = parent if elem.tag != 'Layer': raise ValueError('%s should be a Layer' % (elem,)) for key in ('Name', 'Title'): val = elem.find(key) if val is not None: setattr(self, key.lower(), val.text.strip()) else: setattr(self, key.lower(), None) self.id=self.name #conform to ... | def __init__(self, elem, parent=None): self.parent = parent if elem.tag != 'Layer': raise ValueError('%s should be a Layer' % (elem,)) for key in ('Name', 'Title'): val = elem.find(key) if val is not None: setattr(self, key.lower(), val.text.strip()) else: setattr(self, key.lower(), 'unnamed_layer') self.id=self.name #... | 447,736 |
def _buildMetadata(self): ''' set up capabilities metadata objects ''' #serviceIdentification metadata serviceelem=self._capabilities.find('Service') self.identification=ServiceIdentification(serviceelem, self.version) #serviceProvider metadata self.provider=ServiceProvider(serviceelem) #serviceOperations metadata s... | def _buildMetadata(self): ''' set up capabilities metadata objects ''' #serviceIdentification metadata serviceelem=self._capabilities.find('Service') self.identification=ServiceIdentification(serviceelem, self.version) #serviceProvider metadata self.provider=ServiceProvider(serviceelem) #serviceOperations metadata s... | 447,737 |
def __init__(self, elem, parent=None): self.parent = parent if elem.tag != 'Layer': raise ValueError('%s should be a Layer' % (elem,)) for key in ('Name', 'Title', 'Attribution'): val = elem.find(key) if val is not None: setattr(self, key.lower(), val.text.strip()) else: setattr(self, key.lower(), None) self.id=self.na... | def __init__(self, elem, parent=None): self.parent = parent if elem.tag != 'Layer': raise ValueError('%s should be a Layer' % (elem,)) for key in ('Name', 'Title'): val = elem.find(key) if val is not None: setattr(self, key.lower(), val.text.strip()) else: setattr(self, key.lower(), None) self.id=self.name #conform to ... | 447,738 |
def __init__(self, elem, parent=None): self.parent = parent if elem.tag != 'Layer': raise ValueError('%s should be a Layer' % (elem,)) for key in ('Name', 'Title', 'Attribution'): val = elem.find(key) if val is not None: setattr(self, key.lower(), val.text.strip()) else: setattr(self, key.lower(), None) self.id=self.na... | def attribution = elem.find('Attribution') if attribution is not None: self.attribution = dict() title = attribution.find('Title') url = attribution.find('OnlineResource') logo = attribution.find('LogoURL') if title is not None: self.attribution['title'] = title.text if url is not None: self.attribution['url'] = url.at... | 447,739 |
def __init__(self, md): val = md.find('idinfo/datasetid') self.datasetid = util.testXMLValue(val) | def __init__(self, md): val = md.find('idinfo/datasetid') self.datasetid = util.testXMLValue(val) | 447,740 |
def setsortby(self, parent, propertyname, order='ASC'): """ | def setsortby(self, parent, propertyname, order='ASC'): """ | 447,741 |
def _buildMetadata(self): ''' set up capabilities metadata objects ''' #serviceIdentification metadata serviceelem=self._capabilities.find('Service') self.identification=ServiceIdentification(serviceelem, self.version) #serviceProvider metadata self.provider=ServiceProvider(serviceelem) #serviceOperations metadata s... | def _buildMetadata(self): ''' set up capabilities metadata objects ''' #serviceIdentification metadata serviceelem=self._capabilities.find('Service') self.identification=ServiceIdentification(serviceelem, self.version) #serviceProvider metadata self.provider=ServiceProvider(serviceelem) #serviceOperations metadata s... | 447,742 |
def __init__(self, md): val = md.find('idinfo/datasetid') self.datasetid = util.testXMLValue(val) | def __init__(self, md): val = md.find('idinfo/datasetid') self.datasetid = util.testXMLValue(val) | 447,743 |
def transaction(self, ttype=None, typename='csw:Record', record=None, propertyname=None, propertyvalue=None, bbox=None, keywords=[], cql=None): """ | def transaction(self, ttype=None, typename='csw:Record', record=None, propertyname=None, propertyvalue=None, bbox=None, keywords=[], cql=None): """ | 447,744 |
def _parseinsertresult(self): self.results['inserted'] = [] for i in self._exml.findall(util.nspath('TransactionResponse/InsertResult', namespaces['csw'])): for j in i.findall(util.nspath('BriefRecord', namespaces['csw']) + '/' + util.nspath('identifier', namespaces['dc'])): self.results['inserted'].append(util.testXML... | def _parseinsertresult(self): self.results['inserted'] = [] for i in self._exml.findall(util.nspath('InsertResult', namespaces['csw'])): for j in i.findall(util.nspath('BriefRecord', namespaces['csw']) + '/' + util.nspath('identifier', namespaces['dc'])): self.results['inserted'].append(util.testXMLValue(j)) | 447,745 |
def _parsetransactionsummary(self): val = self._exml.find(util.nspath('TransactionResponse/TransactionSummary', namespaces['csw'])) if val is not None: id = val.attrib.get('requestId') self.results['requestid'] = util.testXMLValue(id, True) ts = val.find(util.nspath('totalInserted', namespaces['csw'])) self.results['in... | def _parsetransactionsummary(self): val = self._exml.find(util.nspath('TransactionSummary', namespaces['csw'])) if val is not None: id = val.attrib.get('requestId') self.results['requestid'] = util.testXMLValue(id, True) ts = val.find(util.nspath('totalInserted', namespaces['csw'])) self.results['inserted'] = util.test... | 447,746 |
def setsortby(self, parent, propertyname, order='ASC'): """ | def setsortby(self, parent, propertyname, order='ASC'): """ | 447,747 |
def _buildMetadata(self): ''' set up capabilities metadata objects ''' #serviceIdentification metadata serviceelem=self._capabilities.find('Service') self.identification=ServiceIdentification(serviceelem, self.version) #serviceProvider metadata self.provider=ServiceProvider(serviceelem) #serviceOperations metadata s... | def _buildMetadata(self): ''' set up capabilities metadata objects ''' #serviceIdentification metadata serviceelem=self._capabilities.find('Service') self.identification=ServiceIdentification(serviceelem, self.version) #serviceProvider metadata self.provider=ServiceProvider(serviceelem) #serviceOperations metadata s... | 447,748 |
def __init__(self, elem, parent=None): self.parent = parent if elem.tag != 'Layer': raise ValueError('%s should be a Layer' % (elem,)) for key in ('Name', 'Title'): val = elem.find(key) if val is not None: setattr(self, key.lower(), val.text.strip()) else: setattr(self, key.lower(), 'unnamed_layer') self.id=self.name #... | def __init__(self, elem, parent=None, index=0): if elem.tag != 'Layer': raise ValueError('%s should be a Layer' % (elem,)) for key in ('Name', 'Title'): val = elem.find(key) if val is not None: setattr(self, key.lower(), val.text.strip()) else: setattr(self, key.lower(), 'unnamed_layer') self.id=self.name #conform to n... | 447,749 |
def __init__(self, elem, parent=None): self.parent = parent if elem.tag != 'Layer': raise ValueError('%s should be a Layer' % (elem,)) for key in ('Name', 'Title'): val = elem.find(key) if val is not None: setattr(self, key.lower(), val.text.strip()) else: setattr(self, key.lower(), 'unnamed_layer') self.id=self.name #... | def __init__(self, elem, parent=None): self.parent = parent if elem.tag != 'Layer': raise ValueError('%s should be a Layer' % (elem,)) self.parent = parent if parent: self.index = "%s.%d" % (parent.index, index) else: self.index = str(index) self.title = elem.find('Title').text.strip() name = elem.find('Name') self.... | 447,750 |
def __init__(self,elem,namespace=DEFAULT_OWS_NAMESPACE): self.name = elem.attrib['name'] self.formatOptions = ['text/xml'] methods = [] for verb in elem.findall(util.nspath('DCP/HTTP/*', namespace)): methods.append((verb.tag, {'url': verb.attrib[util.nspath('href', XLINK_NAMESPACE)]})) self.methods = dict(methods) | def __init__(self,elem,namespace=DEFAULT_OWS_NAMESPACE): self.name = elem.attrib['name'] self.formatOptions = ['text/xml'] methods = [] for verb in elem.findall(util.nspath('DCP/HTTP/*', namespace)): methods.append((verb.tag, {'url': verb.attrib[util.nspath('href', XLINK_NAMESPACE)]})) self.methods = dict(methods) | 447,751 |
def __init__(self, elem, namespace=DEFAULT_OWS_NAMESPACE): self.minx = None self.miny = None self.maxx = None self.maxy = None | def __init__(self, elem, namespace=DEFAULT_OWS_NAMESPACE): self.minx = None self.miny = None self.maxx = None self.maxy = None | 447,752 |
def __init__(self, elem, namespace=DEFAULT_OWS_NAMESPACE): self.minx = None self.miny = None self.maxx = None self.maxy = None | def __init__(self, elem, namespace=DEFAULT_OWS_NAMESPACE): self.minx = None self.miny = None self.maxx = None self.maxy = None | 447,753 |
def _buildMetadata(self): ''' set up capabilities metadata objects ''' #serviceIdentification metadata serviceelem=self._capabilities.find('Service') self.identification=ServiceIdentification(serviceelem, self.version) #serviceProvider metadata self.provider=ServiceProvider(serviceelem) #serviceOperations metadata s... | def _buildMetadata(self): ''' set up capabilities metadata objects ''' #serviceIdentification metadata serviceelem=self._capabilities.find('Service') self.identification=ServiceIdentification(serviceelem, self.version) #serviceProvider metadata self.provider=ServiceProvider(serviceelem) #serviceOperations metadata s... | 447,754 |
def __init__(self, elem, parent=None): self.parent = parent if elem.tag != 'Layer': raise ValueError('%s should be a Layer' % (elem,)) for key in ('Name', 'Title'): val = elem.find(key) if val is not None: setattr(self, key.lower(), val.text.strip()) else: setattr(self, key.lower(), None) self.id=self.name #conform to ... | def __init__(self, elem, parent=None): self.parent = parent if elem.tag != 'Layer': raise ValueError('%s should be a Layer' % (elem,)) for key in ('Name', 'Title'): val = elem.find(key) if val is not None: setattr(self, key.lower(), val.text.strip()) else: setattr(self, key.lower(), 'unnamed_layer') self.id=self.name #... | 447,755 |
def _buildMetadata(self): ''' set up capabilities metadata objects ''' #serviceIdentification metadata serviceelem=self._capabilities.find('Service') self.identification=ServiceIdentification(serviceelem, self.version) #serviceProvider metadata self.provider=ServiceProvider(serviceelem) #serviceOperations metadata s... | def _buildMetadata(self): ''' set up capabilities metadata objects ''' #serviceIdentification metadata serviceelem=self._capabilities.find('Service') self.identification=ServiceIdentification(serviceelem, self.version) #serviceProvider metadata self.provider=ServiceProvider(serviceelem) #serviceOperations metadata s... | 447,756 |
def __init__(self, elem, parent=None): self.parent = parent if elem.tag != 'Layer': raise ValueError('%s should be a Layer' % (elem,)) for key in ('Name', 'Title'): val = elem.find(key) if val is not None: setattr(self, key.lower(), val.text.strip()) else: setattr(self, key.lower(), 'unnamed_layer') self.id=self.name #... | def __init__(self, elem, parent=None, index=0): if elem.tag != 'Layer': raise ValueError('%s should be a Layer' % (elem,)) for key in ('Name', 'Title'): val = elem.find(key) if val is not None: setattr(self, key.lower(), val.text.strip()) else: setattr(self, key.lower(), 'unnamed_layer') self.id=self.name #conform to n... | 447,757 |
def __init__(self, elem, parent=None): self.parent = parent if elem.tag != 'Layer': raise ValueError('%s should be a Layer' % (elem,)) for key in ('Name', 'Title'): val = elem.find(key) if val is not None: setattr(self, key.lower(), val.text.strip()) else: setattr(self, key.lower(), 'unnamed_layer') self.id=self.name #... | def __init__(self, elem, parent=None): self.parent = parent if elem.tag != 'Layer': raise ValueError('%s should be a Layer' % (elem,)) self.parent = parent if parent: self.index = "%s.%d" % (parent.index, index) else: self.index = str(index) self.title = elem.find('Title').text.strip() name = elem.find('Name') self.... | 447,758 |
def setsortby(self, parent, propertyname, order='ASC'): """ | def setsortby(self, parent, propertyname, order='ASC'): """ | 447,759 |
def set(self, parent=False, qtype=None, keywords=[], typenames='csw:Record', propertyname='AnyText', bbox=None): """ | def set(self, parent=False, qtype=None, keywords=[], typenames='csw:Record', propertyname='AnyText', bbox=None): """ | 447,760 |
def __init__(self, elem, parent=None): self.parent = parent if elem.tag != 'Layer': raise ValueError('%s should be a Layer' % (elem,)) for key in ('Name', 'Title', 'Attribution'): val = elem.find(key) if val is not None: setattr(self, key.lower(), val.text.strip()) else: setattr(self, key.lower(), None) self.id=self.na... | def __init__(self, elem, parent=None): self.parent = parent if elem.tag != 'Layer': raise ValueError('%s should be a Layer' % (elem,)) for key in ('Name', 'Title'): val = elem.find(key) if val is not None: setattr(self, key.lower(), val.text.strip()) else: setattr(self, key.lower(), None) self.id=self.name #conform to ... | 447,761 |
def __init__(self, elem, parent=None): self.parent = parent if elem.tag != 'Layer': raise ValueError('%s should be a Layer' % (elem,)) for key in ('Name', 'Title', 'Attribution'): val = elem.find(key) if val is not None: setattr(self, key.lower(), val.text.strip()) else: setattr(self, key.lower(), None) self.id=self.na... | def attribution = elem.find('Attribution') if attribution is not None: self.attribution = dict() title = attribution.find('Title') url = attribution.find('OnlineResource') logo = attribution.find('LogoURL') if title is not None: self.attribution['title'] = title.text if url is not None: self.attribution['url'] = url.at... | 447,762 |
def set_statusicon_tooltip (self, tooltip=None): if not self.trayicon: return | def set_statusicon_tooltip (self, tooltip=None): if not self.trayicon: return | 447,763 |
def __init__(self, parent = None): QObject.__init__(self) | def __init__(self, parent = None): QObject.__init__(self) | 447,764 |
def notify_new_printer (self, printer, title, text): self.sysTray.show() KNotification.event(title, text, KIcon("konqueror").pixmap(QSize(22,22))) | def notify_new_printer (self, printer, title, text): self.sysTray.setStatus(KStatusNotifierItem.Active) KNotification.event(title, text, KIcon("konqueror").pixmap(QSize(22,22))) | 447,765 |
def NewPrinter (self, status, name, mfg, mdl, des, cmd): """hal-cups-utils has set up a new printer""" """ print "status: " + str(status) print "name: " + name print "mfg: " + mfg print "mdl: " + mdl print "des: " + des print "cmd: " + cmd """ | def NewPrinter (self, status, name, mfg, mdl, des, cmd): """hal-cups-utils has set up a new printer""" """ print "status: " + str(status) print "name: " + name print "mfg: " + mfg print "mdl: " + mdl print "des: " + des print "cmd: " + cmd """ | 447,766 |
def __init__(self, parent = None): QObject.__init__(self) | def __init__(self, parent = None): QObject.__init__(self) | 447,767 |
def job_event (self, mon, jobid, eventname, event, jobdata): monitor.Watcher.job_event (self, mon, jobid, eventname, event, jobdata) | def job_event (self, mon, jobid, eventname, event, jobdata): monitor.Watcher.job_event (self, mon, jobid, eventname, event, jobdata) | 447,768 |
def __init__(self, parent = None): QObject.__init__(self) | def __init__(self, parent = None): QObject.__init__(self) | 447,769 |
def __init__(self, parent = None): QObject.__init__(self) | def __init__(self, parent = None): QObject.__init__(self) | 447,770 |
def set_statusicon_tooltip (self, tooltip=None): if not self.trayicon: return | def set_statusicon_tooltip (self, tooltip=None): if not self.trayicon: return | 447,771 |
def set_statusicon_tooltip (self, tooltip=None): if not self.trayicon: return | def set_statusicon_tooltip (self, tooltip=None): if not self.trayicon: return | 447,772 |
def __init__(self, parent = None): QObject.__init__(self) | def __init__(self, parent = None): QObject.__init__(self) | 447,773 |
def __init__(self, parent = None): QObject.__init__(self) | def __init__(self, parent = None): QObject.__init__(self) | 447,774 |
def read(*rnames): return open(os.path.join(os.path.dirname(__file__), *rnames)).read() | def read(*rnames): return open(os.path.join(os.path.dirname(__file__), *rnames)).read() | 447,775 |
def read(*rnames): return open(os.path.join(os.path.dirname(__file__), *rnames)).read() | def read(*rnames): return open(os.path.join(os.path.dirname(__file__), *rnames)).read() | 447,776 |
def testMockCreationAlias(self): self.assertEquals(mock, Mock) | def testMockCreationAlias(self): self.assertEquals(mock, Mock) | 447,777 |
def testMockCreationAlias(self): self.assertEquals(mock, Mock) | def testMockCreationAlias(self): warnings.simplefilter("ignore") self.assertTrue(isinstance(Mock(), mock)) | 447,778 |
def testStubsWithMultipleChainedExceptions(self): theMock = mock() when(theMock).getStuff().thenRaise(Exception("foo"), Exception("bar")).thenRaise(Exception("foobar")) self.assertRaisesMessage("foo", theMock.getStuff) self.assertRaisesMessage("bar", theMock.getStuff) self.assertRaisesMessage("foobar", theMock.getStuf... | def testStubsWithMultipleChainedExceptions(self): theMock = mock() when(theMock).getStuff().thenRaise(Exception("foo"), Exception("bar")).thenRaise(Exception("foobar")) def testLeavesOriginalMethodUntouchedWhenCreatingStubFromRealClass(self): class Person: def get_name(self): return "original name" person = Person() ... | 447,779 |
def testStubbingOverrides(self): mock = Mock() when(mock).foo(any()).thenReturn(1) when(mock).foo("oh").thenReturn(2) self.assertEquals(2, mock.foo("oh")) self.assertEquals(1, mock.foo("xxx")) | def testStubbingOverrides2(self): mock = Mock() when(mock).foo(any()).thenReturn(1) when(mock).foo("oh").thenReturn(2) self.assertEquals(2, mock.foo("oh")) self.assertEquals(1, mock.foo("xxx")) | 447,780 |
def __init__(self, input, output): self.input = input self.output = output self.docdir = None execdir = os.path.dirname(sys.executable) homedir = os.environ.get('PYTHONHOME') for dir in [os.environ.get('PYTHONDOCS'), homedir and os.path.join(homedir, 'doc'), os.path.join(execdir, 'doc'), '/usr/doc/python-docs-' + split... | def __init__(self, input, output): self.input = input self.output = output self.docdir = None if sys.executable is None: execdir = os.getcwd() else: execdir = os.path.dirname(sys.executable) homedir = os.environ.get('PYTHONHOME') for dir in [os.environ.get('PYTHONDOCS'), homedir and os.path.join(homedir, 'doc'), os.pa... | 447,781 |
def run(self, args, javaHome, jythonHome, jythonOpts): ''' creates a start script, executes it and captures the output ''' (starterPath, outfilePath) = self.writeStarter(args, javaHome, jythonHome, jythonOpts) try: process = Runtime.getRuntime().exec(starterPath) stdoutMonitor = StdoutMonitor(process) stderrMonitor = S... | def run(self, args, javaHome, jythonHome, jythonOpts): ''' creates a start script, executes it and captures the output ''' (starterPath, outfilePath) = self.writeStarter(args, javaHome, jythonHome, jythonOpts) try: process = Runtime.getRuntime().exec(starterPath) stdoutMonitor = StdoutMonitor(process) stderrMonitor = S... | 447,782 |
def test_property_singlequote(self): self.assertOutput(["-J-DmyProperty='myValue'"]) # a space inside value does not work in jython.bat | def test_property_singlequote(self): self.assertOutput(["-J-DmyProperty='myValue'"]) def __test_property_singlequote_space(self): self.assertOutput(["-J-DmyProperty='my Value'"]) # a space inside value does not work in jython.bat | 447,783 |
def test_property_doublequote(self): self.assertOutput(['-J-DmyProperty="myValue"']) # a space inside value does not work in jython.bat | def test_property_doublequote(self): self.assertOutput(['-J-DmyProperty="myValue"']) def __test_property_doublequote_space(self): self.assertOutput(['-J-DmyProperty="my Value"']) # a space inside value does not work in jython.bat | 447,784 |
def test_main(): if os._name == 'nt': test_support.run_unittest(VanillaTest, JavaHomeTest, JythonHomeTest, JythonOptsTest, JavaOptsTest, ArgsTest, DoubleDashTest, GlobPatternTest) else: # provide at least one test for the other platforms - happier build bots test_support.run_unittest(DummyTest) | def test_main(): if os._name == 'nt': test_support.run_unittest(VanillaTest, JavaHomeTest, JythonHomeTest, JythonOptsTest, JavaOptsTest, ArgsTest, DoubleDashTest, GlobPatternTest, ArgsSpacesTest, ArgsSpecialCharsTest) else: # provide at least one test for the other platforms - happier build bots test_support.run_unitte... | 447,785 |
def getuser(): """Get the username from the environment or password database. First try various environment variables, then the password database. This works on Windows as long as USERNAME is set. """ import os for name in ('LOGNAME', 'USER', 'LNAME', 'USERNAME'): user = os.environ.get(name) if user: return user ... | def getuser(): """Get the username from the environment or password database. First try various environment variables, then the password database. This works on Windows as long as USERNAME is set. """ for name in ('LOGNAME', 'USER', 'LNAME', 'USERNAME'): user = os.environ.get(name) if user: return user # If this f... | 447,786 |
def getuser(): """Get the username from the environment or password database. First try various environment variables, then the password database. This works on Windows as long as USERNAME is set. """ import os for name in ('LOGNAME', 'USER', 'LNAME', 'USERNAME'): user = os.environ.get(name) if user: return user ... | def getuser(): """Get the username from the environment or password database. First try various environment variables, then the password database. This works on Windows as long as USERNAME is set. """ import os for name in ('LOGNAME', 'USER', 'LNAME', 'USERNAME'): user = os.environ.get(name) if user: return user ... | 447,787 |
def test_append(self): self._test_append('ab') | def test_append(self): self._test_append('ab') | 447,788 |
def popen(cmd, mode='r', bufsize=-1): """popen(command [, mode='r' [, bufsize]]) -> pipe Open a pipe to/from a command returning a file object. """ if not isinstance(cmd, (str, unicode)): raise TypeError('invalid cmd type (%s, expected string)' % type(cmd)) if mode not in ('r', 'w'): raise ValueError("invalid mode %r"... | def popen(cmd, mode='r', bufsize=-1): """popen(command [, mode='r' [, bufsize]]) -> pipe Open a pipe to/from a command returning a file object. """ if not isinstance(cmd, (str, unicode)): raise TypeError('invalid cmd type (%s, expected string)' % type(cmd)) if mode not in ('r', 'w'): raise ValueError("invalid mode %r"... | 447,789 |
def popen(cmd, mode='r', bufsize=-1): """popen(command [, mode='r' [, bufsize]]) -> pipe Open a pipe to/from a command returning a file object. """ if not isinstance(cmd, (str, unicode)): raise TypeError('invalid cmd type (%s, expected string)' % type(cmd)) if mode not in ('r', 'w'): raise ValueError("invalid mode %r"... | def popen(cmd, mode='r', bufsize=-1): """popen(command [, mode='r' [, bufsize]]) -> pipe Open a pipe to/from a command returning a file object. """ if not isinstance(cmd, (str, unicode)): raise TypeError('invalid cmd type (%s, expected string)' % type(cmd)) if mode not in ('r', 'w'): raise ValueError("invalid mode %r"... | 447,790 |
def characters(self, char, start, len): self._cont_handler.characters(str(String(char, start, len))) | def characters(self, char, start, len): self._cont_handler.characters(str(String(char, start, len))) | 447,791 |
def test_print_sans_lib(self): '''Encodes and decodes using utf-8 after in an environment without the standard library | def test_print_sans_lib(self): '''Encodes and decodes using utf-8 after in an environment without the standard library | 447,792 |
def test_print_sans_lib(self): '''Encodes and decodes using utf-8 after in an environment without the standard library | def test_print_sans_lib(self): '''Encodes and decodes using utf-8 after in an environment without the standard library | 447,793 |
def test_print_sans_lib(self): '''Encodes and decodes using utf-8 after in an environment without the standard library | def test_print_sans_lib(self): '''Encodes and decodes using utf-8 after in an environment without the standard library | 447,794 |
def test_main(): test_support.run_unittest(AccessBuiltinCodecs) | def test_main(): test_support.run_unittest(CodecsTestCase) | 447,795 |
def get_line_buffer(): return str(reader.cursorBuffer.buffer) # or use toString to get unicode? | def get_line_buffer(): return str(reader.cursorBuffer.buffer) # or use toString to get unicode? | 447,796 |
def read_init_file(filename=None): pass | def read_init_file(filename=None): print "Not implemented: read_init_file", filename | 447,797 |
def read_history_file(filename="~/.history"): expanded = os.path.expanduser(filename) new_history = reader.getHistory().getClass()() with open(expanded) as f: for line in f: new_history.addToHistory(line) reader.history = new_history | def read_history_file(filename="~/.history"): expanded = os.path.expanduser(filename) new_history = reader.getHistory().getClass()() with open(expanded) as f: for line in f: new_history.addToHistory(line.rstrip()) reader.history = new_history | 447,798 |
def remove_history_item(pos): # TODO possible? raise Exception("not implemented") | def remove_history_item(pos): # TODO possible?if history_list: history_list.remove(pos) else: print "Cannot remove history item at position:", pos | 447,799 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.