rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
sequencelengths
256
256
attention_mask
sequencelengths
256
256
labels
sequencelengths
128
128
def __del__(self, *args): print "ClassAttrSpecific_DataDescriptor.__del__ is about to assert 0 -- could this be causing those weird exceptions?" assert 0, "__del__ is not yet supported in this abstract class"
def __delete__(self, *args): print "note: ClassAttrSpecific_DataDescriptor.__delete__ is about to assert 0" assert 0, "__delete__ is not yet supported in this abstract class"
def __del__(self, *args): ### I bet this should be __delete__ or something ###@@@@ print "ClassAttrSpecific_DataDescriptor.__del__ is about to assert 0 -- could this be causing those weird exceptions?" ####@@@@ did i name the method correctly? guess: no. assert 0, "__del__ is not yet supported in this abstract class"
681b75d395818614eea70912ebd5e60f2c6d0ff0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/681b75d395818614eea70912ebd5e60f2c6d0ff0/ExprsMeta.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3771, 972, 12, 2890, 16, 380, 1968, 4672, 11849, 467, 2701, 333, 1410, 506, 1001, 3733, 972, 578, 5943, 11849, 30989, 30989, 1172, 315, 797, 3843, 9969, 67, 751, 3187, 16186, 3771, 972, 353, 2973, 358, 1815, 374, 1493, 3377, 333, 506, 25416, 5348, 20843, 4798, 7225, 11849, 7, 30989, 30989, 5061, 277, 508, 326, 707, 8783, 35, 7274, 30, 1158, 18, 1815, 374, 16, 10425, 3771, 972, 353, 486, 4671, 3260, 316, 333, 8770, 667, 6, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3771, 972, 12, 2890, 16, 380, 1968, 4672, 11849, 467, 2701, 333, 1410, 506, 1001, 3733, 972, 578, 5943, 11849, 30989, 30989, 1172, 315, 797, 3843, 9969, 67, 751, 3187, 16186, 3771, 972, 353, 2973, 358, 1815, 374, 1493, 3377, 333, 506, 25416, 5348, 20843, 4798, 7225, 11849, 7, 30989, 30989, 5061, 277, 508, 326, 707, 8783, 35, 7274, 30, 1158, 18, 1815, 374, 16, 10425, 3771, 972, 353, 486, 4671, 3260, 316, 333, 8770, 667, 6, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
else: pagemove = (u'%s%s%s' % (self.pagestart, page.title(), self.pageend)) if self.always == False: ask2 = wikipedia.input(u'Change the page title to "%s"? [(Y)es, (N)o, (Q)uit]' % pagemove) if ask2 in ['y', 'Y']: self.moveOne(page,pagemove,self.delete) elif ask2 in ['q', 'Q']: sys.exit() elif ask2 in ['n', 'N']: pass else: self.treat(page) else: self.moveOne(page,pagemove,self.delete)
def treat(self,page): pagetitle = page.title() wikipedia.output(u'\n>>>> %s <<<<' % pagetitle) if self.prefix: pagetitle = page.titleWithoutNamespace() pagemove = (u'%s%s' % (self.prefix, pagetitle)) if self.always == False: ask2 = wikipedia.input(u'Change the page title to "%s"? [(Y)es, (N)o, (Q)uit]' % pagemove) if ask2 in ['y', 'Y']: self.moveOne(page,pagemove,self.delete) elif ask2 in ['q', 'Q']: sys.exit() elif ask2 in ['n', 'N']: pass else: self.treat(page) else: self.moveOne(page,pagemove,self.delete) elif self.appendAll == False: ask = wikipedia.input('What do you want to do: (c)hange page name, (a)ppend to page name, (n)ext page or (q)uit?') if ask in ['c', 'C']: pagemove = wikipedia.input(u'New page name:') self.moveOne(page,pagemove,self.delete) elif ask in ['a', 'A']: self.pagestart = wikipedia.input(u'Append This to the start:') self.pageend = wikipedia.input(u'Append This to the end:') if page.title() == page.titleWithoutNamespace(): pagemove = (u'%s%s%s' % (self.pagestart, page.title(), self.pageend)) else: ask2 = wikipedia.input(u'Do you want to remove the namespace prefix "%s:"? [(Y)es, (N)o]'% page.site().namespace(page.namespace())) if ask2 in ['y', 'Y']: pagemove = (u'%s%s%s' % (self.pagestart, page. titleWithoutNamespace(), self.pageend)) else: pagemove = (u'%s%s%s' % (self.pagestart, page.title(), self.pageend)) ask2 = wikipedia.input(u'Change the page title to "%s"? [(Y)es, (N)o, (A)ll, (Q)uit]' % pagemove) if ask2 in ['y', 'Y']: self.moveOne(page,pagemove,self.delete) elif ask2 in ['a', 'A']: self.appendAll = True self.moveOne(page,pagemove,self.delete) elif ask2 in ['q', 'Q']: sys.exit() elif ask2 in ['n', 'N']: pass else: self.treat(page) elif ask in ['n', 'N']: pass elif ask in ['q', 'Q']: sys.exit() else: self.treat(page) else: pagemove = (u'%s%s%s' % (self.pagestart, page.title(), self.pageend)) if self.always == False: ask2 = wikipedia.input(u'Change the page title to "%s"? [(Y)es, (N)o, (Q)uit]' % pagemove) if ask2 in ['y', 'Y']: self.moveOne(page,pagemove,self.delete) elif ask2 in ['q', 'Q']: sys.exit() elif ask2 in ['n', 'N']: pass else: self.treat(page) else: self.moveOne(page,pagemove,self.delete)
bd3514937b98bef29f1bfde1f2a14a9940dcaf84 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/bd3514937b98bef29f1bfde1f2a14a9940dcaf84/movepages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10116, 12, 2890, 16, 2433, 4672, 4262, 278, 1280, 273, 1363, 18, 2649, 1435, 21137, 18, 2844, 12, 89, 8314, 82, 9778, 9778, 738, 87, 14360, 32, 11, 738, 4262, 278, 1280, 13, 309, 365, 18, 3239, 30, 4262, 278, 1280, 273, 1363, 18, 2649, 8073, 3402, 1435, 4262, 351, 841, 273, 261, 89, 11, 9, 87, 9, 87, 11, 738, 261, 2890, 18, 3239, 16, 4262, 278, 1280, 3719, 309, 365, 18, 17737, 422, 1083, 30, 6827, 22, 273, 21137, 18, 2630, 12, 89, 11, 3043, 326, 1363, 2077, 358, 2213, 87, 6, 35, 306, 12, 61, 13, 281, 16, 261, 50, 13, 83, 16, 261, 53, 13, 14945, 3864, 738, 4262, 351, 841, 13, 309, 6827, 22, 316, 10228, 93, 2187, 296, 61, 3546, 30, 365, 18, 8501, 3335, 12, 2433, 16, 9095, 351, 841, 16, 2890, 18, 3733, 13, 1327, 6827, 22, 316, 10228, 85, 2187, 296, 53, 3546, 30, 2589, 18, 8593, 1435, 1327, 6827, 22, 316, 10228, 82, 2187, 296, 50, 3546, 30, 1342, 469, 30, 365, 18, 17283, 12, 2433, 13, 469, 30, 365, 18, 8501, 3335, 12, 2433, 16, 9095, 351, 841, 16, 2890, 18, 3733, 13, 1327, 365, 18, 6923, 1595, 422, 1083, 30, 6827, 273, 21137, 18, 2630, 2668, 23801, 741, 1846, 2545, 358, 741, 30, 261, 71, 13, 76, 726, 1363, 508, 16, 261, 69, 13, 84, 1302, 358, 1363, 508, 16, 261, 82, 13, 408, 1363, 578, 261, 85, 13, 14945, 4899, 13, 309, 6827, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10116, 12, 2890, 16, 2433, 4672, 4262, 278, 1280, 273, 1363, 18, 2649, 1435, 21137, 18, 2844, 12, 89, 8314, 82, 9778, 9778, 738, 87, 14360, 32, 11, 738, 4262, 278, 1280, 13, 309, 365, 18, 3239, 30, 4262, 278, 1280, 273, 1363, 18, 2649, 8073, 3402, 1435, 4262, 351, 841, 273, 261, 89, 11, 9, 87, 9, 87, 11, 738, 261, 2890, 18, 3239, 16, 4262, 278, 1280, 3719, 309, 365, 18, 17737, 422, 1083, 30, 6827, 22, 273, 21137, 18, 2630, 12, 89, 11, 3043, 326, 1363, 2077, 358, 2213, 87, 6, 35, 306, 12, 61, 13, 281, 16, 261, 50, 13, 83, 16, 261, 53, 13, 14945, 3864, 738, 4262, 351, 841, 13, 309, 6827, 2 ]
def tests_heteroatom_organics_CH3SiH2CH3(self): StructureTest(dir="heteroatom_organics", test="CH3SiH2CH3") def tests_heteroatom_organics_CH3SiH3(self): StructureTest(dir="heteroatom_organics", test="CH3SiH3") def tests_heteroatom_organics_P_ADAM_C3v(self): StructureTest(dir="heteroatom_organics", test="P_ADAM_C3v")
def tests_heteroatom_organics_CH3SiH2CH3(self): StructureTest(dir="heteroatom_organics", test="CH3SiH2CH3")
1b04cff6e27f660e98e628b425c09e2c157b0350 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/1b04cff6e27f660e98e628b425c09e2c157b0350/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7434, 67, 76, 847, 83, 7466, 67, 22543, 2102, 67, 1792, 23, 55, 77, 44, 22, 1792, 23, 12, 2890, 4672, 13348, 4709, 12, 1214, 1546, 76, 847, 83, 7466, 67, 22543, 2102, 3113, 1842, 1546, 1792, 23, 55, 77, 44, 22, 1792, 23, 7923, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7434, 67, 76, 847, 83, 7466, 67, 22543, 2102, 67, 1792, 23, 55, 77, 44, 22, 1792, 23, 12, 2890, 4672, 13348, 4709, 12, 1214, 1546, 76, 847, 83, 7466, 67, 22543, 2102, 3113, 1842, 1546, 1792, 23, 55, 77, 44, 22, 1792, 23, 7923, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'set', obj_) self.content_.append(obj_) if hasattr(self, 'add_set'): self.add_set(obj_.value) elif hasattr(self, 'set_set'): self.set_set(obj_.value) if not from_subclass and child_.tail is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.tail) self.content_.append(obj_)
self.set.append(obj_)
def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'node': type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type') if type_name_ is None: type_name_ = child_.attrib.get('type') if type_name_ is not None: type_names_ = type_name_.split(':') if len(type_names_) == 1: type_name_ = type_names_[0] else: type_name_ = type_names_[1] class_ = globals()[type_name_] obj_ = class_.factory() obj_.build(child_) else: raise NotImplementedError( 'Class not implemented for <node> element') obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'node', obj_) self.content_.append(obj_) if hasattr(self, 'add_node'): self.add_node(obj_.value) elif hasattr(self, 'set_node'): self.set_node(obj_.value) elif nodeName_ == 'edge': type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type') if type_name_ is None: type_name_ = child_.attrib.get('type') if type_name_ is not None: type_names_ = type_name_.split(':') if len(type_names_) == 1: type_name_ = type_names_[0] else: type_name_ = type_names_[1] class_ = globals()[type_name_] obj_ = class_.factory() obj_.build(child_) else: raise NotImplementedError( 'Class not implemented for <edge> element') obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'edge', obj_) self.content_.append(obj_) if hasattr(self, 'add_edge'): self.add_edge(obj_.value) elif hasattr(self, 'set_edge'): self.set_edge(obj_.value) elif nodeName_ == 'set': obj_ = NodeAndRootEdgeAndEdgeSet.factory() obj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'set', obj_) self.content_.append(obj_) if hasattr(self, 'add_set'): self.add_set(obj_.value) elif hasattr(self, 'set_set'): self.set_set(obj_.value) if not from_subclass and child_.tail is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.tail) self.content_.append(obj_) super(AbstractNetwork, self).buildChildren(child_, nodeName_, True)
9c12e50d449fa27d6f8f3415ece228ae97bb0266 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14016/9c12e50d449fa27d6f8f3415ece228ae97bb0266/_nexml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 4212, 12, 2890, 16, 1151, 67, 16, 7553, 67, 16, 628, 67, 10678, 33, 8381, 4672, 309, 7553, 67, 422, 296, 2159, 4278, 618, 67, 529, 67, 273, 1151, 27799, 14588, 18, 588, 2668, 95, 2505, 2207, 5591, 18, 91, 23, 18, 3341, 19, 6976, 21, 19, 4201, 3078, 17, 1336, 97, 723, 6134, 309, 618, 67, 529, 67, 353, 599, 30, 618, 67, 529, 67, 273, 1151, 27799, 14588, 18, 588, 2668, 723, 6134, 309, 618, 67, 529, 67, 353, 486, 599, 30, 618, 67, 1973, 67, 273, 618, 67, 529, 27799, 4939, 2668, 2497, 13, 309, 562, 12, 723, 67, 1973, 67, 13, 422, 404, 30, 618, 67, 529, 67, 273, 618, 67, 1973, 67, 63, 20, 65, 469, 30, 618, 67, 529, 67, 273, 618, 67, 1973, 67, 63, 21, 65, 667, 67, 273, 10941, 1435, 63, 723, 67, 529, 67, 65, 1081, 67, 273, 667, 27799, 6848, 1435, 1081, 27799, 3510, 12, 3624, 67, 13, 469, 30, 1002, 11206, 12, 296, 797, 486, 8249, 364, 411, 2159, 34, 930, 6134, 1081, 67, 273, 365, 18, 19562, 1106, 67, 12, 19846, 2170, 18, 4457, 12795, 16, 24725, 2170, 18, 559, 7036, 16, 296, 2159, 2187, 1081, 67, 13, 365, 18, 1745, 27799, 6923, 12, 2603, 67, 13, 309, 3859, 12, 2890, 16, 296, 1289, 67, 2159, 11, 4672, 365, 18, 1289, 67, 2159, 12, 2603, 27799, 1132, 13, 1327, 3859, 12, 2890, 16, 296, 542, 67, 2159, 11, 4672, 365, 18, 542, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 4212, 12, 2890, 16, 1151, 67, 16, 7553, 67, 16, 628, 67, 10678, 33, 8381, 4672, 309, 7553, 67, 422, 296, 2159, 4278, 618, 67, 529, 67, 273, 1151, 27799, 14588, 18, 588, 2668, 95, 2505, 2207, 5591, 18, 91, 23, 18, 3341, 19, 6976, 21, 19, 4201, 3078, 17, 1336, 97, 723, 6134, 309, 618, 67, 529, 67, 353, 599, 30, 618, 67, 529, 67, 273, 1151, 27799, 14588, 18, 588, 2668, 723, 6134, 309, 618, 67, 529, 67, 353, 486, 599, 30, 618, 67, 1973, 67, 273, 618, 67, 529, 27799, 4939, 2668, 2497, 13, 309, 562, 12, 723, 67, 1973, 67, 13, 422, 404, 30, 618, 67, 529, 67, 273, 618, 67, 1973, 67, 2 ]
("Registers", self.registers_cb),
def create_ui(self, title, icon): hbox1 = gtk.HBox() stop = gtk.ToggleButton("Stopped") stop.set_active(True) stop.connect("toggled", self.stop_cb) hbox1.add(stop)
a839da0699cb05f1e3add20b29be66d8dc90680a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2811/a839da0699cb05f1e3add20b29be66d8dc90680a/debugui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 4881, 12, 2890, 16, 2077, 16, 4126, 4672, 366, 2147, 21, 273, 22718, 18, 44, 3514, 1435, 2132, 273, 22718, 18, 17986, 3616, 2932, 15294, 7923, 2132, 18, 542, 67, 3535, 12, 5510, 13, 2132, 18, 3612, 2932, 88, 23972, 1259, 3113, 365, 18, 5681, 67, 7358, 13, 366, 2147, 21, 18, 1289, 12, 5681, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 4881, 12, 2890, 16, 2077, 16, 4126, 4672, 366, 2147, 21, 273, 22718, 18, 44, 3514, 1435, 2132, 273, 22718, 18, 17986, 3616, 2932, 15294, 7923, 2132, 18, 542, 67, 3535, 12, 5510, 13, 2132, 18, 3612, 2932, 88, 23972, 1259, 3113, 365, 18, 5681, 67, 7358, 13, 366, 2147, 21, 18, 1289, 12, 5681, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
if timestamp: timestamp >>= 32 timestamp -= ntp_basetime from time import gmtime, strftime b = strftime("%a, %d %b %Y %H:%M:%S +0000", gmtime(timestamp)) else: b = 'None'
def i2repr(self, pkt, val): if val is None: return "--" val = self.i2h(pkt,val) if val < _NTP_BASETIME: return val return time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime(val-_NTP_BASETIME)) def any2i(self, pkt, val): if type(val) is str: return int(time.mktime(time.strptime(val))) + _NTP_BASETIME + 3600 return FixedPointField.any2i(self,pkt,val) def i2m(self, pkt, val): if val is None: val = FixedPointField.any2i(self, pkt, time.time()+_NTP_BASETIME) return FixedPointField.i2m(self, pkt, val)
def getfield(self, pkt, s): s,timestamp = BitField.getfield(self, pkt, s)
9d09b28d5287bac631834e0092a511c0ebe8eefd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7311/9d09b28d5287bac631834e0092a511c0ebe8eefd/ntp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 1518, 12, 2890, 16, 11536, 16, 272, 4672, 272, 16, 5508, 273, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 1518, 12, 2890, 16, 11536, 16, 272, 4672, 272, 16, 5508, 273, 6539, 974, 18, 588, 1518, 12, 2890, 16, 11536, 16, 272, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
CylPanel.className_ = _moose.cvar.CylPanel_className_
def getType(*args): """getType(self) -> string""" return _moose.CylPanel_getType(*args)
1961c35f540060f41023dcf804a850794a39f350 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2961/1961c35f540060f41023dcf804a850794a39f350/moose.py
[ 1, 8585, 326, 22398, 316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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3130, 30857, 1968, 4672, 3536, 588, 559, 12, 2890, 13, 317, 533, 8395, 327, 389, 8683, 2584, 18, 17992, 80, 5537, 67, 588, 559, 30857, 1968, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
else
else:
def __init__(data = None) if data == None: quickfix.CharField.__init__(self, 385) else quickfix.CharField.__init__(self, 385, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 2156, 974, 16186, 2738, 972, 12, 2890, 16, 890, 7140, 13, 469, 30, 9549, 904, 18, 2156, 974, 16186, 2738, 972, 12, 2890, 16, 890, 7140, 16, 501, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 2156, 974, 16186, 2738, 972, 12, 2890, 16, 890, 7140, 13, 469, 30, 9549, 904, 18, 2156, 974, 16186, 2738, 972, 12, 2890, 16, 890, 7140, 16, 501, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
self.children = None
self.__children = None
def __init__(self, string = None): """Create using an optional string of code. If no string is given, an empty, valid element "()" is created. Throws ValueError if there is a problem with the passed string.""" if string == None: return
19e2a3fa16d7c2269ac1ad9a96e45f49b9adb63a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7008/19e2a3fa16d7c2269ac1ad9a96e45f49b9adb63a/GGP.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 533, 273, 599, 4672, 3536, 1684, 1450, 392, 3129, 533, 434, 981, 18, 971, 1158, 533, 353, 864, 16, 392, 1008, 16, 923, 930, 315, 10031, 353, 2522, 18, 22435, 2068, 309, 1915, 353, 279, 6199, 598, 326, 2275, 533, 12123, 225, 309, 533, 422, 599, 30, 327, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 533, 273, 599, 4672, 3536, 1684, 1450, 392, 3129, 533, 434, 981, 18, 971, 1158, 533, 353, 864, 16, 392, 1008, 16, 923, 930, 315, 10031, 353, 2522, 18, 22435, 2068, 309, 1915, 353, 279, 6199, 598, 326, 2275, 533, 12123, 225, 309, 533, 422, 599, 30, 327, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
resp = self.shortcmd('IHAVE ' + id) if resp[0] != '3': raise NNTPReplyError(resp) while 1: line = f.readline() if not line: break if line[-1] == '\n': line = line[:-1] if line[:1] == '.': line = '.' + line self.putline(line) self.putline('.') return self.getresp()
return self._post('IHAVE {0}'.format(id), f)
def ihave(self, id, f): """Process an IHAVE command. Arguments: - id: message-id of the article - f: file containing the article Returns: - resp: server response if successful Note that if the server refuses the article an exception is raised."""
9bd2973908ef080e31fd8a2b44c929188a135cb0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/9bd2973908ef080e31fd8a2b44c929188a135cb0/nntplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18456, 836, 12, 2890, 16, 612, 16, 284, 4672, 3536, 2227, 392, 467, 19191, 3412, 1296, 18, 225, 13599, 30, 300, 612, 30, 883, 17, 350, 434, 326, 7559, 300, 284, 30, 225, 585, 4191, 326, 7559, 2860, 30, 300, 1718, 30, 1438, 766, 309, 6873, 3609, 716, 309, 326, 1438, 1278, 6117, 326, 7559, 392, 1520, 353, 11531, 12123, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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3536, 2227, 392, 467, 19191, 3412, 1296, 18, 225, 13599, 30, 300, 612, 30, 883, 17, 350, 434, 326, 7559, 300, 284, 30, 225, 585, 4191, 326, 7559, 2860, 30, 300, 1718, 30, 1438, 766, 309, 6873, 3609, 716, 309, 326, 1438, 1278, 6117, 326, 7559, 392, 1520, 353, 11531, 12123, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
self.mplayer.signals['stdout'].connect(self._handle_mplayer_debug) self.mplayer.signals['stderr'].connect(self._handle_mplayer_debug)
self.mplayer.signals['read'].connect(self._handle_mplayer_debug)
def __init__(self, thumbnailer): self.jobs = [] self._current = None self.notify_client = thumbnailer.notify_client self.create_failed = thumbnailer.create_failed self.mplayer = kaa.Process(['mplayer', '-nosound', '-vo', 'png:z=2', '-benchmark', '-frames', '10', '-osdlevel', '0', '-nocache', '-zoom', '-ss' ]) self.mplayer.signals['stdout'].connect(self._handle_mplayer_debug) self.mplayer.signals['stderr'].connect(self._handle_mplayer_debug)
aec2f48653ca4a1cbd5c158efb431c06bf66f7ee /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11703/aec2f48653ca4a1cbd5c158efb431c06bf66f7ee/videothumb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 9134, 264, 4672, 365, 18, 10088, 273, 5378, 365, 6315, 2972, 273, 599, 365, 18, 12336, 67, 2625, 273, 9134, 264, 18, 12336, 67, 2625, 365, 18, 2640, 67, 7307, 273, 9134, 264, 18, 2640, 67, 7307, 365, 18, 81, 14872, 273, 417, 7598, 18, 2227, 12, 3292, 81, 14872, 2187, 2400, 18050, 772, 2187, 2400, 12307, 2187, 296, 6446, 30, 94, 33, 22, 2187, 2400, 70, 9737, 2187, 2400, 10278, 2187, 296, 2163, 2187, 2400, 538, 72, 2815, 2187, 296, 20, 2187, 2400, 31031, 2187, 2400, 14932, 2187, 2400, 1049, 11, 308, 13, 365, 18, 81, 14872, 18, 29659, 3292, 10283, 29489, 3612, 12, 2890, 6315, 4110, 67, 81, 14872, 67, 4148, 13, 365, 18, 81, 14872, 18, 29659, 3292, 11241, 29489, 3612, 12, 2890, 6315, 4110, 67, 81, 14872, 67, 4148, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 9134, 264, 4672, 365, 18, 10088, 273, 5378, 365, 6315, 2972, 273, 599, 365, 18, 12336, 67, 2625, 273, 9134, 264, 18, 12336, 67, 2625, 365, 18, 2640, 67, 7307, 273, 9134, 264, 18, 2640, 67, 7307, 365, 18, 81, 14872, 273, 417, 7598, 18, 2227, 12, 3292, 81, 14872, 2187, 2400, 18050, 772, 2187, 2400, 12307, 2187, 296, 6446, 30, 94, 33, 22, 2187, 2400, 70, 9737, 2187, 2400, 10278, 2187, 296, 2163, 2187, 2400, 538, 72, 2815, 2187, 296, 20, 2187, 2400, 31031, 2187, 2400, 14932, 2187, 2400, 1049, 11, 308, 13, 365, 18, 81, 14872, 18, 29659, 3292, 10283, 29489, 3612, 12, 2890, 6315, 4110, 67, 81, 14872, 67, 2 ]
finally: md.pop(1)
finally: md._pop(1)
def tpRender(self, md, section, args): data=[] try: # see if we are being run as a sub-document root=md['tree-root-url'] url=md['tree-item-url'] state=md['tree-state'] or md['state'] substate=md['-tree-substate-'] colspan=md['tree-colspan'] level=md['tree-level'] except KeyError: # Check for collapse all, expand all, and state try: collapse_all=md['collapse_all'] except: collapse_all=None if collapse_all: state=[] else: try: expand_all=md['expand_all'] except: expand_all=None if expand_all: state=tpValuesIds(self) else: try: state=md['tree-state'] or md['state'] or md['-tree-state-'] if state[0] != '[': state=unquote(state) state=list(eval(state,{'__builtins__':{}})) except: state=[] colspan=1+tpStateLevel(state) level = 0 substate=state root=md['URL'] l=rfind(root, '/') if l >= 0: root=root[l+1:] url='' # Save state in a cookie if state: md['RESPONSE'].setCookie('tree-state',quote(str(state)[1:-1]+',')) else: md['RESPONSE'].expireCookie('tree-state') if substate==state: data.append('<TABLE CELLSPACING="0">\n') #level=0 treeData={'tree-root-url': root, 'tree-colspan': colspan, 'tree-state': state } md.push(treeData) try: for item in self.tpValues(): data=tpRenderTABLE(item,root,url,state,substate,data,colspan, section,md,treeData, level, args) if state is substate: data.append('</TABLE>\n') result=join(data,'') finally: md.pop(1) return result
4bfabee08bc58b7d857ce85c5add2cdd6cc571dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4bfabee08bc58b7d857ce85c5add2cdd6cc571dd/TreeTag.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8071, 3420, 12, 2890, 16, 3481, 16, 2442, 16, 833, 4672, 501, 33, 8526, 225, 775, 30, 468, 2621, 309, 732, 854, 3832, 1086, 487, 279, 720, 17, 5457, 1365, 33, 1264, 3292, 3413, 17, 3085, 17, 718, 3546, 880, 33, 1264, 3292, 3413, 17, 1726, 17, 718, 3546, 919, 33, 1264, 3292, 3413, 17, 2019, 3546, 578, 3481, 3292, 2019, 3546, 720, 2019, 33, 1264, 3292, 17, 3413, 17, 1717, 2019, 17, 3546, 20856, 33, 1264, 3292, 3413, 17, 1293, 3969, 3546, 1801, 33, 1264, 3292, 3413, 17, 2815, 3546, 1335, 4999, 30, 468, 2073, 364, 13627, 777, 16, 4542, 777, 16, 471, 919, 775, 30, 565, 13627, 67, 454, 33, 1264, 3292, 21405, 67, 454, 3546, 1335, 30, 13627, 67, 454, 33, 7036, 309, 13627, 67, 454, 30, 919, 33, 8526, 469, 30, 775, 30, 565, 4542, 67, 454, 33, 1264, 3292, 12320, 67, 454, 3546, 1335, 30, 4542, 67, 454, 33, 7036, 309, 4542, 67, 454, 30, 919, 33, 6834, 1972, 2673, 12, 2890, 13, 469, 30, 775, 30, 919, 33, 1264, 3292, 3413, 17, 2019, 3546, 578, 3481, 3292, 2019, 3546, 578, 3481, 3292, 17, 3413, 17, 2019, 17, 3546, 309, 919, 63, 20, 65, 480, 8375, 30, 919, 33, 318, 6889, 12, 2019, 13, 919, 33, 1098, 12, 8622, 12, 2019, 16, 27828, 972, 12406, 2679, 972, 4278, 2916, 31700, 1335, 30, 919, 33, 8526, 20856, 33, 21, 15, 6834, 1119, 2355, 12, 2019, 13, 1801, 273, 374, 720, 2019, 33, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8071, 3420, 12, 2890, 16, 3481, 16, 2442, 16, 833, 4672, 501, 33, 8526, 225, 775, 30, 468, 2621, 309, 732, 854, 3832, 1086, 487, 279, 720, 17, 5457, 1365, 33, 1264, 3292, 3413, 17, 3085, 17, 718, 3546, 880, 33, 1264, 3292, 3413, 17, 1726, 17, 718, 3546, 919, 33, 1264, 3292, 3413, 17, 2019, 3546, 578, 3481, 3292, 2019, 3546, 720, 2019, 33, 1264, 3292, 17, 3413, 17, 1717, 2019, 17, 3546, 20856, 33, 1264, 3292, 3413, 17, 1293, 3969, 3546, 1801, 33, 1264, 3292, 3413, 17, 2815, 3546, 1335, 4999, 30, 468, 2073, 364, 13627, 777, 16, 4542, 777, 16, 471, 919, 775, 30, 565, 13627, 67, 454, 33, 1264, 3292, 21405, 67, 454, 3546, 2 ]
ids=orderpoint_obj.search(cr,uid,[],offset=offset,limit=100)
procurement_obj = pooler.get_pool(cr.dbname).get('mrp.procurement') ids = procurement_obj.search(cr, uid, [('state', '=', 'exception')], order='date_planned')
def _procure_confirm(self, cr, uid, schedule_cycle=1.0, po_cycle=1.0,\ po_lead=1.0, security_lead=50.0, picking_lead=1.0, user_id=False,\ use_new_cursor=False, context=None): ''' use_new_cursor: False or the dbname ''' if not context: context={} if use_new_cursor: cr = pooler.get_db(use_new_cursor).cursor() wf_service = netsvc.LocalService("workflow") ids=orderpoint_obj.search(cr,uid,[],offset=offset,limit=100) for id in ids: wf_service.trg_validate(uid, 'mrp.procurement', id, 'button_restart', cr) if use_new_cursor: cr.commit() po_time = po_cycle + po_lead maxdate = DateTime.now() + DateTime.RelativeDateTime(days=schedule_cycle + security_lead) start_date = time.strftime('%Y-%m-%d, %Hh %Mm %Ss') offset = 0 report = [] report_total = 0 report_except = 0 report_later = 0 ids = [1] procurement_obj = pooler.get_pool(cr.dbname).get('mrp.procurement') while len(ids): cr.execute('select id from mrp_procurement where state=%s and procure_method=%s order by date_planned limit 500 offset %d', ('confirmed','make_to_order',offset)) ids = map(lambda x:x[0], cr.fetchall()) for proc in procurement_obj.browse(cr, uid, ids): if proc.product_id.supply_method=='produce': wf_service.trg_validate(uid, 'mrp.procurement', proc.id, 'button_check', cr) else: if (maxdate + DateTime.RelativeDateTime(days=(proc.product_id.seller_delay or 0 + po_time))).strftime('%Y-%m-%d')>=proc.date_planned: wf_service.trg_validate(uid, 'mrp.procurement', proc.id, 'button_check', cr) else: offset+=1 report_later += 1 for proc in procurement_obj.browse(cr, uid, ids): if proc.state == 'exception': report.append('PROC %d: on order - %3.2f %-5s - %s' % \ (proc.id, proc.product_qty, proc.product_uom.name, proc.product_id.name)) report_except += 1 report_total += 1 if use_new_cursor: cr.commit() offset = 0 ids = [1] while len(ids): report_ids = [] ids = pooler.get_pool(cr.dbname).get('mrp.procurement').search(cr, uid, [('state','=','confirmed'),('procure_method','=','make_to_stock')], offset=offset) for proc in procurement_obj.browse(cr, uid, ids): if (maxdate + DateTime.RelativeDateTime(days=picking_lead)).strftime('%Y-%m-%d') >= proc.date_planned: wf_service.trg_validate(uid, 'mrp.procurement', proc.id, 'button_check', cr) report_ids.append(proc.id) else: report_later +=1 report_total +=1 for proc in procurement_obj.browse(cr, uid, report_ids): if proc.state == 'exception': report.append('PROC %d: from stock - %3.2f %-5s - %s' % \ (proc.id, proc.product_qty, proc.product_uom.name, proc.product_id.name,)) report_except +=1 if use_new_cursor: cr.commit() offset += len(ids) end_date = time.strftime('%Y-%m-%d, %Hh %Mm %Ss') if user_id: request = pooler.get_pool(cr.dbname).get('res.request') summary = '''Here is the procurement scheduling report.
c29ec3cfbc3d651b19ef6d2bdae4e0e0d6222ab2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/c29ec3cfbc3d651b19ef6d2bdae4e0e0d6222ab2/schedulers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9381, 594, 67, 10927, 12, 2890, 16, 4422, 16, 4555, 16, 4788, 67, 13946, 33, 21, 18, 20, 16, 8275, 67, 13946, 33, 21, 18, 20, 17211, 8275, 67, 24429, 33, 21, 18, 20, 16, 4373, 67, 24429, 33, 3361, 18, 20, 16, 6002, 310, 67, 24429, 33, 21, 18, 20, 16, 729, 67, 350, 33, 8381, 17211, 999, 67, 2704, 67, 9216, 33, 8381, 16, 819, 33, 7036, 4672, 9163, 999, 67, 2704, 67, 9216, 30, 1083, 578, 326, 18448, 9163, 309, 486, 819, 30, 819, 12938, 225, 309, 999, 67, 2704, 67, 9216, 30, 4422, 273, 2845, 264, 18, 588, 67, 1966, 12, 1202, 67, 2704, 67, 9216, 2934, 9216, 1435, 11578, 67, 3278, 273, 21954, 4227, 18, 25635, 2932, 13815, 7923, 225, 5418, 594, 475, 67, 2603, 273, 2845, 264, 18, 588, 67, 6011, 12, 3353, 18, 20979, 2934, 588, 2668, 81, 13832, 18, 9381, 594, 475, 6134, 3258, 273, 5418, 594, 475, 67, 2603, 18, 3072, 12, 3353, 16, 4555, 16, 306, 2668, 2019, 2187, 15196, 2187, 296, 4064, 6134, 6487, 1353, 2218, 712, 67, 412, 10041, 6134, 364, 612, 316, 3258, 30, 11578, 67, 3278, 18, 313, 75, 67, 5662, 12, 1911, 16, 296, 81, 13832, 18, 9381, 594, 475, 2187, 612, 16, 296, 5391, 67, 19164, 2187, 4422, 13, 309, 999, 67, 2704, 67, 9216, 30, 4422, 18, 7371, 1435, 225, 8275, 67, 957, 273, 8275, 67, 13946, 397, 8275, 67, 24429, 943, 712, 273, 3716, 18, 3338, 1435, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9381, 594, 67, 10927, 12, 2890, 16, 4422, 16, 4555, 16, 4788, 67, 13946, 33, 21, 18, 20, 16, 8275, 67, 13946, 33, 21, 18, 20, 17211, 8275, 67, 24429, 33, 21, 18, 20, 16, 4373, 67, 24429, 33, 3361, 18, 20, 16, 6002, 310, 67, 24429, 33, 21, 18, 20, 16, 729, 67, 350, 33, 8381, 17211, 999, 67, 2704, 67, 9216, 33, 8381, 16, 819, 33, 7036, 4672, 9163, 999, 67, 2704, 67, 9216, 30, 1083, 578, 326, 18448, 9163, 309, 486, 819, 30, 819, 12938, 225, 309, 999, 67, 2704, 67, 9216, 30, 4422, 273, 2845, 264, 18, 588, 67, 1966, 12, 1202, 67, 2704, 67, 9216, 2934, 9216, 1435, 11578, 67, 3278, 273, 2 ]
if os.path.isfile(self.__current_file): name = read_string(self.__current_file) else: return None
name = self._get_field('current')
def get_current(self): """Return the name of the topmost patch, or None if there is no such patch.""" if os.path.isfile(self.__current_file): name = read_string(self.__current_file) else: return None if name == '': return None else: return name
8fe7e9f08ae6fe49cec66a8034e8495cbf77c6f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12366/8fe7e9f08ae6fe49cec66a8034e8495cbf77c6f3/stack.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2972, 12, 2890, 4672, 3536, 990, 326, 508, 434, 326, 1760, 10329, 4729, 16, 578, 599, 309, 1915, 353, 1158, 4123, 4729, 12123, 508, 273, 365, 6315, 588, 67, 1518, 2668, 2972, 6134, 309, 508, 422, 875, 30, 327, 599, 469, 30, 327, 508, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2972, 12, 2890, 4672, 3536, 990, 326, 508, 434, 326, 1760, 10329, 4729, 16, 578, 599, 309, 1915, 353, 1158, 4123, 4729, 12123, 508, 273, 365, 6315, 588, 67, 1518, 2668, 2972, 6134, 309, 508, 422, 875, 30, 327, 599, 469, 30, 327, 508, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
), \
),
def is_newer(file1, file2): """ Return True if either file2 does not exist or is older than file1. If file1 does not exist, always return False. """ if not os.path.exists(file1): return False if not os.path.exists(file2): return True if os.path.getmtime(file2) < os.path.getmtime(file1): return True return False
12aff705aa1e2b2dc6e401b763fe2e9e51bdf02d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/12aff705aa1e2b2dc6e401b763fe2e9e51bdf02d/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 2704, 264, 12, 768, 21, 16, 585, 22, 4672, 3536, 2000, 1053, 309, 3344, 585, 22, 1552, 486, 1005, 578, 353, 12156, 2353, 585, 21, 18, 225, 971, 585, 21, 1552, 486, 1005, 16, 3712, 327, 1083, 18, 3536, 309, 486, 1140, 18, 803, 18, 1808, 12, 768, 21, 4672, 327, 1083, 309, 486, 1140, 18, 803, 18, 1808, 12, 768, 22, 4672, 327, 1053, 309, 1140, 18, 803, 18, 588, 10838, 12, 768, 22, 13, 411, 1140, 18, 803, 18, 588, 10838, 12, 768, 21, 4672, 327, 1053, 327, 1083, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 21, 16, 585, 22, 4672, 3536, 2000, 1053, 309, 3344, 585, 22, 1552, 486, 1005, 578, 353, 12156, 2353, 585, 21, 18, 225, 971, 585, 21, 1552, 486, 1005, 16, 3712, 327, 1083, 18, 3536, 309, 486, 1140, 18, 803, 18, 1808, 12, 768, 21, 4672, 327, 1083, 309, 486, 1140, 18, 803, 18, 1808, 12, 768, 22, 4672, 327, 1053, 309, 1140, 18, 803, 18, 588, 10838, 12, 768, 22, 13, 411, 1140, 18, 803, 18, 588, 10838, 12, 768, 21, 4672, 327, 1053, 327, 1083, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
(user_id_field, email_field, homedir_field, maildir_field, users_table, email_field, db.escape_string(args.d)))
(user_id_field, email_field, homedir_field, maildir_field, users_table, email_field, db.escape_string(to_address)))
def main(): #Parse out the command line args parser = argparse.ArgumentParser() parser.add_argument("-c", help='Config file', metavar="<conf>") parser.add_argument("-d", help='Delivery mode for this user', metavar="<user>", required=True) parser.add_argument("-f", help='Email file', metavar="<file>") args = parser.parse_args() # First, we check to see if they define a config file. If they do, # but it doesn't exist, throw TEMPFAIL and exit. Ths will cause the # MTA to queue the message for later delivery. config_file = None if not args.c == None: if not os.path.isfile(args.c): print "The specified config file was not found!" sys.exit(EX_TEMPFAIL) else: config_file = args.c # If they haven't specified a conf, look in the usual places. else: paths = [] paths.append("./") paths.append("/etc/") for i in paths: if os.path.isfile(i + "/dystill.conf"): config_file = i + "/dystill.conf" # If we got this far without a file, throw TEMPFAIL and exit. if config_file == None: print "Cound not find a configuration file!" sys.exit(EX_TEMPFAIL) # Load the file up into the config parser. config = ConfigParser.RawConfigParser() config.read(config_file) # Read some database stuff from the config users_table = None user_id_field = None email_field = None homedir_field = None maildir_field = None try: users_table = config.get("database", "users_table") user_id_field = config.get("database", "user_id_field") email_field = config.get("database", "email_field") homedir_field = config.get("database", "homedir_field") maildir_field = config.get("database", "maildir_field") except ConfigParser.NoOptionError, message: print "Could not read required options from the config file: " + message.__str__() sys.exit(EX_TEMPFAIL) # If a file is specified, read that data = None if not args.f == None and os.path.isfile(args.f): f = open(args.f) data = f.read() f.close() # Else, read it from the pipe else: data = sys.stdin.read() # If we got this far without data, throw TEMPFAIL and exit. if data == None or len(data) == 0: print "Could not read email data!" sys.exit(EX_TEMPFAIL) # Load up the email parser and try to parse the message parser = email.Parser.Parser() try: zemail = parser.parsestr(data, True) except email.errors.MessageParseError: print "Could not parse email data!" sys.exit(EX_TEMPFAIL) # Add a header to the email message zemail.__setitem__("X-MDA", os.path.splitext(os.path.basename(__file__))[0] + " " + VERSION) # So we now have an email. Time to talk to the database. try: db = MySQLdb.connect( host=config.get("database", "host"), user=config.get("database", "user"), passwd=config.get("database", "password"), db=config.get("database", "database"), cursorclass=MySQLdb.cursors.DictCursor) except ConfigParser.NoOptionError, message: print "Could not read required options from the config file: " + message.__str__() sys.exit(EX_TEMPFAIL) except MySQLdb.OperationalError, (value, message): print "Could not connect to the database: " + message sys.exit(EX_TEMPFAIL) # Query for the user first, so we know where to deliver to. try: cursor = db.cursor() cursor.execute("select %s as id, %s as email, %s as homedir, %s as maildir from %s where %s = '%s' limit 1" % (user_id_field, email_field, homedir_field, maildir_field, users_table, email_field, db.escape_string(args.d))) except MySQLdb.ProgrammingError, (value, message): print "Internal error: " + message sys.exit(EX_TEMPFAIL) # Pull out the user user = cursor.fetchone() cursor.close() # Check to see if the user actually exists. We shouldn't even be here # if this is the case, but we check just to be sure. if user == None: print "Could not find user " + args.d + " in users table." db.close() sys.exit(EX_TEMPFAIL) # Query for the rules try: cursor = db.cursor() cursor.execute("select * from filters inner join filters_actions using (filter_id) where (user_id = %d or user_id = 0) and active = 1" % (user["id"],)) except MySQLdb.ProgrammingError, (value, message): print "Internal error: " + message sys.exit(EX_TEMPFAIL) # Pull out the rules rules = cursor.fetchall() cursor.close() # Close the DB to free up resources ASAP. db.close() # Define maildir maildir = user["homedir"] + "/" + user["maildir"] # Check that the homedir path exists if not os.path.isdir(user["homedir"]): print "Home directory " + user["homedir"] + " is not found!" sys.exit(EX_TEMPFAIL) # Check that the homedir path is writable if not os.access(user["homedir"], os.W_OK): print "Home directory " + user["homedir"] + " is not writable!" sys.exit(EX_TEMPFAIL) # Now we loop through the rules and build an actions table actions = {} for rule in rules: # Because there can be more than 1 header of type X in a message headers = zemail.get_all(rule["field"]) # Otherwise, regexp match on the header values if not headers == None: if not rule["comparison"] == 4: test = re.escape(rule["value"]) else: test = rule["value"] for header in headers: if rule["comparison"] == 0: # Starts with match = re.compile("^" + test) if match.match(header): actions[rule["action"]] = rule["argument"] if rule["comparison"] == 1: # Ends with match = re.compile(".*" + test + "$") if match.match(header): actions[rule["action"]] = rule["argument"] if rule["comparison"] == 2: # Contains match = re.compile(".*" + test + ".*") if match.match(header): actions[rule["action"]] = rule["argument"] if rule["comparison"] == 3: # Is if header == test: actions[rule["action"]] = rule["argument"] if rule["comparison"] == 4: # Regexp match = re.compile(test) if match.match(header): actions[rule["action"]] = rule["argument"] # Open the maildir for delivery inbox = mailbox.Maildir(maildir, factory=None) folders = inbox.list_folders() # Bring the message in message = mailbox.MaildirMessage(zemail) delivered = False exit = EX_OK # Mark as read if actions.__contains__("markasread"): message.add_flag("S") message.set_subdir("cur") # Flag if actions.__contains__("flag"): message.add_flag("F") # Delete if actions.__contains__("delete"): message.add_flag("S") message.add_flag("T") message.set_subdir("cur") # Prepend Subject if actions.__contains__("prependsub"): message["subject"] = actions["prependsub"] + " " + message["subject"] # Add a header if actions.__contains__("header"): headers = actions("header").partition(":") message.__setitem__(headers[0], headers[2]) # Forward to another user if actions.__contains__("forward"): fwd_message = copy.deepcopy(message) fwd_message["subject"] = "Fwd: " + fwd_message["subject"] fwd_message["to"] = actions["forward"] s = smtplib.SMTP("localhost") s.sendmail(user["email"], actions["forward"], fwd_message.__str__()) s.quit() message.add_flag("P") # Silently block delivery of this message if actions.__contains__("block"): delivered = True # Noisily block delivery of this message if actions.__contains__("blocknote"): delivered = True exit = EX_NOPERM print "User " + user["email"] + " does not wish to receive this email." # Copy to another folder if actions.__contains__("copyto"): if not folders.__contains__(actions["to"]): inbox.add_folder(actions["to"]) copy_message = copy.deepcopy(message) folder = inbox.get_folder(actions["to"]) folder.lock() folder.add(copy_message) folder.unlock() folder.close() # Deliver to another box. We always do this last. if actions.__contains__("to"): # Determine if the folder exists. Create it if it doesn't. if not folders.__contains__(actions["to"]): inbox.add_folder(actions["to"]) folder = inbox.get_folder(actions["to"]) folder.lock() folder.add(message) folder.unlock() folder.close() delivered = True # If the message hasn't already been delivered, it goes into the inbox if not delivered: inbox.lock() inbox.add(message) inbox.unlock() # Message delivered! We're done! inbox.close() sys.exit(exit)
1790937640b34b77e13262613b18033610b79251 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13617/1790937640b34b77e13262613b18033610b79251/dystill.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 225, 468, 3201, 596, 326, 1296, 980, 833, 2082, 273, 12436, 18, 1379, 2678, 1435, 2082, 18, 1289, 67, 3446, 2932, 17, 71, 3113, 2809, 2218, 809, 585, 2187, 15050, 1546, 32, 3923, 2984, 13, 2082, 18, 1289, 67, 3446, 2932, 17, 72, 3113, 2809, 2218, 8909, 1965, 364, 333, 729, 2187, 15050, 1546, 32, 1355, 2984, 16, 1931, 33, 5510, 13, 2082, 18, 1289, 67, 3446, 2932, 17, 74, 3113, 2809, 2218, 4134, 585, 2187, 15050, 1546, 32, 768, 2984, 13, 225, 833, 273, 2082, 18, 2670, 67, 1968, 1435, 225, 468, 5783, 16, 732, 866, 358, 2621, 309, 2898, 4426, 279, 642, 585, 18, 971, 2898, 741, 16, 468, 1496, 518, 3302, 1404, 1005, 16, 604, 24401, 12319, 471, 2427, 18, 935, 87, 903, 4620, 326, 468, 490, 9833, 358, 2389, 326, 883, 364, 5137, 7912, 18, 642, 67, 768, 273, 599, 309, 486, 833, 18, 71, 422, 599, 30, 309, 486, 1140, 18, 803, 18, 291, 768, 12, 1968, 18, 71, 4672, 1172, 315, 1986, 1269, 642, 585, 1703, 486, 1392, 4442, 2589, 18, 8593, 12, 2294, 67, 10258, 12319, 13, 469, 30, 642, 67, 768, 273, 833, 18, 71, 225, 468, 971, 2898, 15032, 1404, 1269, 279, 2195, 16, 2324, 316, 326, 25669, 12576, 18, 469, 30, 2953, 273, 5378, 2953, 18, 6923, 2932, 18, 4898, 13, 2953, 18, 6923, 2932, 19, 14175, 4898, 13, 225, 364, 277, 316, 2953, 30, 309, 1140, 18, 803, 18, 291, 768, 12, 77, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 225, 468, 3201, 596, 326, 1296, 980, 833, 2082, 273, 12436, 18, 1379, 2678, 1435, 2082, 18, 1289, 67, 3446, 2932, 17, 71, 3113, 2809, 2218, 809, 585, 2187, 15050, 1546, 32, 3923, 2984, 13, 2082, 18, 1289, 67, 3446, 2932, 17, 72, 3113, 2809, 2218, 8909, 1965, 364, 333, 729, 2187, 15050, 1546, 32, 1355, 2984, 16, 1931, 33, 5510, 13, 2082, 18, 1289, 67, 3446, 2932, 17, 74, 3113, 2809, 2218, 4134, 585, 2187, 15050, 1546, 32, 768, 2984, 13, 225, 833, 273, 2082, 18, 2670, 67, 1968, 1435, 225, 468, 5783, 16, 732, 866, 358, 2621, 309, 2898, 4426, 279, 642, 585, 18, 971, 2898, 741, 16, 468, 1496, 518, 3302, 1404, 1005, 2 ]
Called by handles to update the item's properties all at once.
Called by the item model to update our appearance.
def _update(self, **kw): ''' Called by handles to update the item's properties all at once. ''' # Alter the apparent Z-order of the item self.scene().resort_item(self)
ae2db5832ef19ca21fa7b0003d192cf02e760b52 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10170/ae2db5832ef19ca21fa7b0003d192cf02e760b52/canvas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2725, 12, 2890, 16, 2826, 9987, 4672, 9163, 11782, 635, 326, 761, 938, 358, 1089, 3134, 9788, 1359, 18, 9163, 468, 2262, 387, 326, 29614, 2285, 17, 1019, 434, 326, 761, 365, 18, 23694, 7675, 455, 499, 67, 1726, 12, 2890, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2725, 12, 2890, 16, 2826, 9987, 4672, 9163, 11782, 635, 326, 761, 938, 358, 1089, 3134, 9788, 1359, 18, 9163, 468, 2262, 387, 326, 29614, 2285, 17, 1019, 434, 326, 761, 365, 18, 23694, 7675, 455, 499, 67, 1726, 12, 2890, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
if base_name == "libc" and "uClibc" not in ldlib:
if base_name == "libc":
def version(vers): print "mklibs: version ",vers print ""
cc965623e0fdfa17682017b151e3731079dcb523 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/326/cc965623e0fdfa17682017b151e3731079dcb523/mklibs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1177, 12, 2496, 4672, 1172, 315, 24816, 21571, 30, 1177, 3104, 2496, 1172, 1408, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1177, 12, 2496, 4672, 1172, 315, 24816, 21571, 30, 1177, 3104, 2496, 1172, 1408, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
if xyz[1]<0.0:
if xyz[1] < 0.0:
def calc_cell(self, xyz): """Returns the cell integer 3-Tuple where the xyz fractional coordinates are located. """ if xyz[0]<0.0: cx = int(xyz[0] - 1.0) else: cx = int(xyz[0] + 1.0) if xyz[1]<0.0: cy = int(xyz[1] - 1.0) else: cy = int(xyz[1] + 1.0)
657a0fa458b88d14958d396920748c66a75850e7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10674/657a0fa458b88d14958d396920748c66a75850e7/UnitCell.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7029, 67, 3855, 12, 2890, 16, 14779, 4672, 3536, 1356, 326, 2484, 3571, 890, 17, 9038, 1625, 326, 14779, 20462, 5513, 854, 13801, 18, 3536, 309, 14779, 63, 20, 65, 32, 20, 18, 20, 30, 9494, 273, 509, 12, 17177, 63, 20, 65, 300, 404, 18, 20, 13, 469, 30, 9494, 273, 509, 12, 17177, 63, 20, 65, 397, 404, 18, 20, 13, 225, 309, 14779, 63, 21, 65, 411, 374, 18, 20, 30, 6143, 273, 509, 12, 17177, 63, 21, 65, 300, 404, 18, 20, 13, 469, 30, 6143, 273, 509, 12, 17177, 63, 21, 65, 397, 404, 18, 20, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7029, 67, 3855, 12, 2890, 16, 14779, 4672, 3536, 1356, 326, 2484, 3571, 890, 17, 9038, 1625, 326, 14779, 20462, 5513, 854, 13801, 18, 3536, 309, 14779, 63, 20, 65, 32, 20, 18, 20, 30, 9494, 273, 509, 12, 17177, 63, 20, 65, 300, 404, 18, 20, 13, 469, 30, 9494, 273, 509, 12, 17177, 63, 20, 65, 397, 404, 18, 20, 13, 225, 309, 14779, 63, 21, 65, 411, 374, 18, 20, 30, 6143, 273, 509, 12, 17177, 63, 21, 65, 300, 404, 18, 20, 13, 469, 30, 6143, 273, 509, 12, 17177, 63, 21, 65, 397, 404, 18, 20, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
print "checking", file, "...",
print("checking", file, "...", end=' ')
def check(file): if os.path.isdir(file) and not os.path.islink(file): if verbose: print "listing directory", file names = os.listdir(file) for name in names: fullname = os.path.join(file, name) if ((recurse and os.path.isdir(fullname) and not os.path.islink(fullname)) or name.lower().endswith(".py")): check(fullname) return if verbose: print "checking", file, "...", try: f = open(file) except IOError as msg: errprint("%s: I/O Error: %s" % (file, str(msg))) return r = Reindenter(f) f.close() if r.run(): if verbose: print "changed." if dryrun: print "But this is a dry run, so leaving it alone." if not dryrun: bak = file + ".bak" if os.path.exists(bak): os.remove(bak) os.rename(file, bak) if verbose: print "renamed", file, "to", bak f = open(file, "w") r.write(f) f.close() if verbose: print "wrote new", file else: if verbose: print "unchanged."
84b442fcd23eee856cc7a76aeb9955452c619e64 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/84b442fcd23eee856cc7a76aeb9955452c619e64/reindent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 768, 4672, 309, 1140, 18, 803, 18, 291, 1214, 12, 768, 13, 471, 486, 1140, 18, 803, 18, 291, 1232, 12, 768, 4672, 309, 3988, 30, 1172, 315, 21228, 1867, 3113, 585, 1257, 273, 1140, 18, 1098, 1214, 12, 768, 13, 364, 508, 316, 1257, 30, 13321, 273, 1140, 18, 803, 18, 5701, 12, 768, 16, 508, 13, 309, 14015, 29362, 471, 1140, 18, 803, 18, 291, 1214, 12, 21885, 13, 471, 486, 1140, 18, 803, 18, 291, 1232, 12, 21885, 3719, 578, 508, 18, 8167, 7675, 5839, 1918, 2932, 18, 2074, 6, 3719, 30, 866, 12, 21885, 13, 327, 225, 309, 3988, 30, 1172, 2932, 24609, 3113, 585, 16, 26456, 16, 679, 2218, 8624, 775, 30, 284, 273, 1696, 12, 768, 13, 1335, 8340, 487, 1234, 30, 393, 1188, 27188, 87, 30, 467, 19, 51, 1068, 30, 738, 87, 6, 738, 261, 768, 16, 609, 12, 3576, 20349, 327, 225, 436, 273, 868, 728, 2328, 12, 74, 13, 284, 18, 4412, 1435, 309, 436, 18, 2681, 13332, 309, 3988, 30, 1172, 315, 6703, 1199, 309, 10299, 2681, 30, 1172, 315, 31167, 333, 353, 279, 10299, 1086, 16, 1427, 15086, 518, 24068, 1199, 309, 486, 10299, 2681, 30, 324, 581, 273, 585, 397, 3552, 31170, 6, 309, 1140, 18, 803, 18, 1808, 12, 31170, 4672, 1140, 18, 4479, 12, 31170, 13, 1140, 18, 18539, 12, 768, 16, 324, 581, 13, 309, 3988, 30, 1172, 315, 1187, 2808, 3113, 585, 16, 315, 869, 3113, 324, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 768, 4672, 309, 1140, 18, 803, 18, 291, 1214, 12, 768, 13, 471, 486, 1140, 18, 803, 18, 291, 1232, 12, 768, 4672, 309, 3988, 30, 1172, 315, 21228, 1867, 3113, 585, 1257, 273, 1140, 18, 1098, 1214, 12, 768, 13, 364, 508, 316, 1257, 30, 13321, 273, 1140, 18, 803, 18, 5701, 12, 768, 16, 508, 13, 309, 14015, 29362, 471, 1140, 18, 803, 18, 291, 1214, 12, 21885, 13, 471, 486, 1140, 18, 803, 18, 291, 1232, 12, 21885, 3719, 578, 508, 18, 8167, 7675, 5839, 1918, 2932, 18, 2074, 6, 3719, 30, 866, 12, 21885, 13, 327, 225, 309, 3988, 30, 1172, 2932, 24609, 3113, 585, 16, 26456, 16, 679, 2218, 8624, 775, 2 ]
flags = [ flag ]
flags = [ (flag, deps.FLAG_SENSE_REQUIRED) ]
def _brokenItemsToSet(cu, depIdList): # this only works for databases (not repositories) if not depIdList: return []
d8eec0182d9ad52fb380b32523cb93fe410ce92b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/d8eec0182d9ad52fb380b32523cb93fe410ce92b/deptable.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 70, 19906, 3126, 25208, 12, 6319, 16, 5993, 22117, 4672, 468, 333, 1338, 6330, 364, 16358, 261, 902, 14531, 13, 309, 486, 5993, 22117, 30, 327, 5378, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 70, 19906, 3126, 25208, 12, 6319, 16, 5993, 22117, 4672, 468, 333, 1338, 6330, 364, 16358, 261, 902, 14531, 13, 309, 486, 5993, 22117, 30, 327, 5378, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
if int(platform.release().split('.')[0]) <= 8:
if int(platform.release().split('.')[0]) < 8:
def checkEnvironment(): """ Check that we're running on a supported system. """ if platform.system() != 'Darwin': fatal("This script should be run on a Mac OS X 10.4 (or later) system") if int(platform.release().split('.')[0]) <= 8: fatal("This script should be run on a Mac OS X 10.4 (or later) system") if not os.path.exists(SDKPATH): fatal("Please install the latest version of Xcode and the %s SDK"%( os.path.basename(SDKPATH[:-4])))
209d4c3151df0affb96fafc6826d24fc68fc3a15 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/209d4c3151df0affb96fafc6826d24fc68fc3a15/build-installer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 5494, 13332, 3536, 2073, 716, 732, 4565, 3549, 603, 279, 3260, 2619, 18, 3536, 225, 309, 4072, 18, 4299, 1435, 480, 296, 40, 19992, 4278, 10081, 2932, 2503, 2728, 1410, 506, 1086, 603, 279, 13217, 5932, 1139, 1728, 18, 24, 261, 280, 5137, 13, 2619, 7923, 225, 309, 509, 12, 9898, 18, 9340, 7675, 4939, 2668, 1093, 25146, 20, 5717, 411, 1725, 30, 10081, 2932, 2503, 2728, 1410, 506, 1086, 603, 279, 13217, 5932, 1139, 1728, 18, 24, 261, 280, 5137, 13, 2619, 7923, 225, 309, 486, 1140, 18, 803, 18, 1808, 12, 22625, 4211, 4672, 10081, 2932, 8496, 3799, 326, 4891, 1177, 434, 1139, 710, 471, 326, 738, 87, 3881, 6, 17105, 1140, 18, 803, 18, 13909, 12, 22625, 4211, 10531, 17, 24, 65, 20349, 565, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 5494, 13332, 3536, 2073, 716, 732, 4565, 3549, 603, 279, 3260, 2619, 18, 3536, 225, 309, 4072, 18, 4299, 1435, 480, 296, 40, 19992, 4278, 10081, 2932, 2503, 2728, 1410, 506, 1086, 603, 279, 13217, 5932, 1139, 1728, 18, 24, 261, 280, 5137, 13, 2619, 7923, 225, 309, 509, 12, 9898, 18, 9340, 7675, 4939, 2668, 1093, 25146, 20, 5717, 411, 1725, 30, 10081, 2932, 2503, 2728, 1410, 506, 1086, 603, 279, 13217, 5932, 1139, 1728, 18, 24, 261, 280, 5137, 13, 2619, 7923, 225, 309, 486, 1140, 18, 803, 18, 1808, 12, 22625, 4211, 4672, 10081, 2932, 8496, 3799, 326, 4891, 1177, 434, 1139, 710, 471, 326, 738, 87, 3881, 6, 17105, 1140, 18, 803, 18, 2 ]
content[-1] += build_start_tag_link(stream, tag_name, attributes)
content[-1] += build_start_tag(tag_name, attributes)
def compute_paragraph(stream, elt_tag_name, elt_attributes, pdf_stylesheet=None): content = [] cpt = 0 end_tag = False has_content = False is_table = elt_tag_name in ('td', 'th') story = [] tag_stack = [] while True: event, value, line_number = stream_next(stream) if event == None: break #### START ELEMENT #### if event == START_ELEMENT: tag_uri, tag_name, attributes = value if is_table: skip = True # TODO ? Merge with body_stream? if tag_name in ('p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'): story.append(paragraph_stream(stream, tag_name, attributes, pdf_stylesheet)) elif tag_name == 'pre': story.append(pre_stream(stream, tag_name, attributes, pdf_stylesheet)) elif tag_name == 'hr': story.append(hr_stream(stream, tag_name, attributes)) elif tag_name == 'img': widget = img_stream(stream, tag_name, attributes) if widget: story.append(widget) elif tag_name in ('ol', 'ul'): story.extend(list_stream(stream, tag_name, attributes, pdf_stylesheet)) elif tag_name == 'table': story.append(table_stream(stream, tag_name, attributes, pdf_stylesheet)) else: skip = False if skip: continue if tag_name in INLINE: if tag_name in ('i', 'em', 'b', 'strong', 'u', 'sup', 'sub'): # FIXME tag = P_FORMAT.get(tag_name, 'b') if cpt or has_content: content[-1] += build_start_tag(tag) else: content.append(build_start_tag(tag)) cpt += 1 elif tag_name == 'span': tag = P_FORMAT.get(tag_name, 'b') attrs, tag_stack = build_span_attributes(attributes) if cpt or has_content: content[-1] += build_start_tag(tag, attrs) else: content.append(build_start_tag(tag, attrs)) for i in tag_stack: content[-1] += '<%s>' % i cpt += 1 elif tag_name == 'br': continue elif tag_name == 'a': if cpt or has_content: content[-1] += build_start_tag_link(stream, tag_name, attributes) else: content.append(build_start_tag_link(stream, tag_name, attributes)) cpt += 1 elif tag_name == 'img': img_attrs = compute_image_attrs(stream, tag_name, attributes) content.append(build_start_tag(tag_name, img_attrs)) content[-1] = content[-1].rstrip('>') content[-1] += ' valign="middle"/>' else: print TAG_NOT_SUPPORTED % ('document', line_number, tag_name) # unknown tag else: print WARNING_DTD % ('document', line_number, tag_name) #### END ELEMENT #### elif event == END_ELEMENT: tag_uri, tag_name = value if tag_name == elt_tag_name: # FIXME # if compute_paragraph is called by tr_stream # then this function return # # either a platypus object list if it exist at least # one platypus object, ignore text out of paragraph # # either a str object in other case # else this function is called by paragraph stream which # want a str list to build the platypus object if is_table: if len(story) > 0: return story return ' '.join(content) return content elif tag_name == 'span': cpt -= 1 end_tag = True while tag_stack: content[-1] += '</%s>' % tag_stack.pop() content[-1] += build_end_tag(P_FORMAT.get(tag_name, 'b')) elif tag_name == 'br': content.append('<br/>') elif tag_name in INLINE: cpt -= 1 end_tag = True content[-1] += build_end_tag(P_FORMAT.get(tag_name, 'b')) else: print TAG_NOT_SUPPORTED % ('document', line_number, tag_name) # unknown tag #### TEXT ELEMENT #### elif event == TEXT: if len(value) > 0: # alow to write : # <para><u><i>foo</i> </u></para> value = XMLContent.encode(value) # entities # spaces must be ignore after a start tag if the next # character is '\n' if value[0] == '\n': value = value.lstrip('\n\t ') if not len(value): continue # spaces must be ignore if character before it is '\n' tmp = value.rstrip(' \t') if len(tmp): if tmp[-1] == '\n': value = tmp.rstrip('\n') if has_content and content[-1].endswith('<br/>'): # <p> # foo <br /> # bar <br /> team # </p> # equal # <p>foo <br />bar <br />team</p> value = value.lstrip() content[-1] += value end_tag = False elif has_content and content[-1].endswith('</span>'): content[-1] += value end_tag = False elif end_tag or cpt: content[-1] += value end_tag = False else: has_content = True content.append(value)
d5c3d51eb9e0cb6c0f317501007d0b2ccb300a98 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12681/d5c3d51eb9e0cb6c0f317501007d0b2ccb300a98/rml2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3671, 67, 22445, 12, 3256, 16, 11572, 67, 2692, 67, 529, 16, 11572, 67, 4350, 16, 8169, 67, 19403, 33, 7036, 4672, 913, 273, 5378, 29141, 273, 374, 679, 67, 2692, 273, 1083, 711, 67, 1745, 273, 1083, 353, 67, 2121, 273, 11572, 67, 2692, 67, 529, 316, 7707, 4465, 2187, 296, 451, 6134, 17285, 273, 5378, 1047, 67, 3772, 273, 5378, 1323, 1053, 30, 871, 16, 460, 16, 980, 67, 2696, 273, 1407, 67, 4285, 12, 3256, 13, 309, 871, 422, 599, 30, 898, 11849, 7, 10485, 13424, 11849, 7, 309, 871, 422, 10485, 67, 10976, 30, 1047, 67, 1650, 16, 1047, 67, 529, 16, 1677, 273, 460, 309, 353, 67, 2121, 30, 2488, 273, 1053, 468, 2660, 692, 8964, 598, 1417, 67, 3256, 35, 309, 1047, 67, 529, 316, 7707, 84, 2187, 296, 76, 21, 2187, 296, 76, 22, 2187, 296, 76, 23, 2187, 296, 76, 24, 2187, 296, 76, 25, 2187, 296, 76, 26, 11, 4672, 17285, 18, 6923, 12, 22445, 67, 3256, 12, 3256, 16, 1047, 67, 529, 16, 1677, 16, 8169, 67, 19403, 3719, 1327, 1047, 67, 529, 422, 296, 1484, 4278, 17285, 18, 6923, 12, 1484, 67, 3256, 12, 3256, 16, 1047, 67, 529, 16, 1677, 16, 8169, 67, 19403, 3719, 1327, 1047, 67, 529, 422, 296, 7256, 4278, 17285, 18, 6923, 12, 7256, 67, 3256, 12, 3256, 16, 1047, 67, 529, 16, 1677, 3719, 1327, 1047, 67, 529, 422, 296, 6081, 4278, 3604, 273, 3774, 67, 3256, 12, 3256, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3671, 67, 22445, 12, 3256, 16, 11572, 67, 2692, 67, 529, 16, 11572, 67, 4350, 16, 8169, 67, 19403, 33, 7036, 4672, 913, 273, 5378, 29141, 273, 374, 679, 67, 2692, 273, 1083, 711, 67, 1745, 273, 1083, 353, 67, 2121, 273, 11572, 67, 2692, 67, 529, 316, 7707, 4465, 2187, 296, 451, 6134, 17285, 273, 5378, 1047, 67, 3772, 273, 5378, 1323, 1053, 30, 871, 16, 460, 16, 980, 67, 2696, 273, 1407, 67, 4285, 12, 3256, 13, 309, 871, 422, 599, 30, 898, 11849, 7, 10485, 13424, 11849, 7, 309, 871, 422, 10485, 67, 10976, 30, 1047, 67, 1650, 16, 1047, 67, 529, 16, 1677, 273, 460, 309, 353, 67, 2121, 30, 2488, 273, 1053, 468, 2 ]
if cn1 > 0 and cn2 > 0:
if n1 > 0 or n2 > 0:
def __compare_node( self, node1, node2, callback ): """Compare two nodes."""
93b2dc695fe501f9e0252ae41d6dd540e118d8cd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/13212/93b2dc695fe501f9e0252ae41d6dd540e118d8cd/diff.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 9877, 67, 2159, 12, 365, 16, 756, 21, 16, 756, 22, 16, 1348, 262, 30, 3536, 8583, 2795, 2199, 12123, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 9877, 67, 2159, 12, 365, 16, 756, 21, 16, 756, 22, 16, 1348, 262, 30, 3536, 8583, 2795, 2199, 12123, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
"""Testing the reviewrequests/unstar API"""
"""Testing the reviewrequests/<id>/?action=unstar API"""
def testReviewRequestUnstar(self): """Testing the reviewrequests/unstar API""" # First, star it. self.testReviewRequestStar()
154ec92ec3bf19718348491a2c6d8aad9e4e21d4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1600/154ec92ec3bf19718348491a2c6d8aad9e4e21d4/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 9159, 691,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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 9159, 691, 984, 10983, 12, 2890, 4672, 3536, 22218, 326, 10725, 11420, 28177, 350, 16893, 35, 1128, 33, 318, 10983, 1491, 8395, 468, 5783, 16, 10443, 518, 18, 365, 18, 3813, 9159, 691, 18379, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
'old': {'path': common,
'old': {'path': common, 'href': None,
def htmlify(match): div, mod = divmod(len(match.group(0)), 2) return div * '&nbsp; ' + mod * '&nbsp;'
7144b52b7c0f27e67b95b4de10defc8d6287db25 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9317/7144b52b7c0f27e67b95b4de10defc8d6287db25/patch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1729, 1164, 12, 1916, 4672, 3739, 16, 681, 273, 26105, 12, 1897, 12, 1916, 18, 1655, 12, 20, 13, 3631, 576, 13, 327, 3739, 380, 5183, 10600, 31, 296, 397, 681, 380, 5183, 10600, 4359, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1729, 1164, 12, 1916, 4672, 3739, 16, 681, 273, 26105, 12, 1897, 12, 1916, 18, 1655, 12, 20, 13, 3631, 576, 13, 327, 3739, 380, 5183, 10600, 31, 296, 397, 681, 380, 5183, 10600, 4359, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
if _isString(dbtype):
if _isString(dbtype) and not val == None:
def sqlStringAndValue(self, val, attr, dbtype): newval = self.typeCheckAndConvert(val, attr, dbtype) if _isString(dbtype): newval = "'" + _escape(str(newval)) + "'" return str(newval), None
4df0f99a23284da17a1eddef4c6b31348b072378 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5832/4df0f99a23284da17a1eddef4c6b31348b072378/postconn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1847, 780, 30154, 12, 2890, 16, 1244, 16, 1604, 16, 1319, 723, 4672, 394, 1125, 273, 365, 18, 723, 1564, 1876, 2723, 12, 1125, 16, 1604, 16, 1319, 723, 13, 309, 389, 291, 780, 12, 1966, 723, 13, 471, 486, 1244, 422, 599, 30, 394, 1125, 273, 5862, 397, 389, 6939, 12, 701, 12, 2704, 1125, 3719, 397, 5862, 327, 609, 12, 2704, 1125, 3631, 599, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1847, 780, 30154, 12, 2890, 16, 1244, 16, 1604, 16, 1319, 723, 4672, 394, 1125, 273, 365, 18, 723, 1564, 1876, 2723, 12, 1125, 16, 1604, 16, 1319, 723, 13, 309, 389, 291, 780, 12, 1966, 723, 13, 471, 486, 1244, 422, 599, 30, 394, 1125, 273, 5862, 397, 389, 6939, 12, 701, 12, 2704, 1125, 3719, 397, 5862, 327, 609, 12, 2704, 1125, 3631, 599, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
Query for sql database: /Users/ekirkm/sage/data//graphs/graphs.db
Query for sql database: ...graphs.db
def __repr__(self): """ Overrides the print output to display useful info regarding the query.
a938df7076953e1f3cea93f308a216354fd3025c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/a938df7076953e1f3cea93f308a216354fd3025c/database.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 3536, 531, 9857, 326, 1172, 876, 358, 2562, 5301, 1123, 29012, 326, 843, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 3536, 531, 9857, 326, 1172, 876, 358, 2562, 5301, 1123, 29012, 326, 843, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
new_column = self.__create_column(" ", 0)
new_column = self.__create_column(" ", 0, None, True)
def __init__(self, ampache_conn, audio_engine, db_session): """Constructor for the AmpacheGUI Class. Takes an AmpacheSession Object, an AudioEngine Object and a DatabaseSession Object.""" ################################# # Set Variables ################################# self.audio_engine = audio_engine self.ampache_conn = ampache_conn self.db_session = db_session
6da71b6c033549432907af16818123b3b63d0d8a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11350/6da71b6c033549432907af16818123b3b63d0d8a/AmpacheGUI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 16946, 807, 67, 4646, 16, 7447, 67, 8944, 16, 1319, 67, 3184, 4672, 3536, 6293, 364, 326, 432, 1291, 807, 43, 5370, 1659, 18, 23004, 392, 432, 1291, 807, 2157, 1033, 16, 392, 15045, 4410, 1033, 471, 279, 5130, 2157, 1033, 12123, 19709, 468, 1000, 23536, 19709, 365, 18, 11509, 67, 8944, 273, 7447, 67, 8944, 365, 18, 931, 807, 67, 4646, 273, 16946, 807, 67, 4646, 365, 18, 1966, 67, 3184, 282, 273, 1319, 67, 3184, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 16946, 807, 67, 4646, 16, 7447, 67, 8944, 16, 1319, 67, 3184, 4672, 3536, 6293, 364, 326, 432, 1291, 807, 43, 5370, 1659, 18, 23004, 392, 432, 1291, 807, 2157, 1033, 16, 392, 15045, 4410, 1033, 471, 279, 5130, 2157, 1033, 12123, 19709, 468, 1000, 23536, 19709, 365, 18, 11509, 67, 8944, 273, 7447, 67, 8944, 365, 18, 931, 807, 67, 4646, 273, 16946, 807, 67, 4646, 365, 18, 1966, 67, 3184, 282, 273, 1319, 67, 3184, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
face = self.map.faceAt(Vector2(x, y))
face = self._map.faceAt(Vector2(x, y))
def mousePressed(self, x, y, button): if button != qt.Qt.LeftButton: return face = self.map.faceAt(Vector2(x, y)) oldClass = self.foreground[face.label()] newClass = self.classes[(self.classes.index(oldClass) + 1) % 3] self.foreground[face.label()] = newClass self.manual[face.label()] = newClass print "manually changed face %d to %s" % (face.label(), newClass) self.emit(qt.PYSIGNAL("classChanged"), (face, ))
65254bc446b7c353066fe806e0424030a38d558d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10394/65254bc446b7c353066fe806e0424030a38d558d/tools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7644, 24624, 12, 2890, 16, 619, 16, 677, 16, 3568, 4672, 309, 3568, 480, 25672, 18, 23310, 18, 3910, 3616, 30, 327, 7945, 273, 365, 6315, 1458, 18, 865, 861, 12, 5018, 22, 12, 92, 16, 677, 3719, 1592, 797, 273, 365, 18, 1405, 2915, 63, 865, 18, 1925, 1435, 65, 394, 797, 273, 365, 18, 4701, 63, 12, 2890, 18, 4701, 18, 1615, 12, 1673, 797, 13, 397, 404, 13, 738, 890, 65, 365, 18, 1405, 2915, 63, 865, 18, 1925, 1435, 65, 273, 394, 797, 365, 18, 19840, 63, 865, 18, 1925, 1435, 65, 273, 394, 797, 1172, 315, 4728, 3452, 3550, 7945, 738, 72, 358, 738, 87, 6, 738, 261, 865, 18, 1925, 9334, 394, 797, 13, 365, 18, 18356, 12, 23311, 18, 16235, 11260, 1013, 2932, 1106, 5033, 6, 3631, 261, 865, 16, 8623, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7644, 24624, 12, 2890, 16, 619, 16, 677, 16, 3568, 4672, 309, 3568, 480, 25672, 18, 23310, 18, 3910, 3616, 30, 327, 7945, 273, 365, 6315, 1458, 18, 865, 861, 12, 5018, 22, 12, 92, 16, 677, 3719, 1592, 797, 273, 365, 18, 1405, 2915, 63, 865, 18, 1925, 1435, 65, 394, 797, 273, 365, 18, 4701, 63, 12, 2890, 18, 4701, 18, 1615, 12, 1673, 797, 13, 397, 404, 13, 738, 890, 65, 365, 18, 1405, 2915, 63, 865, 18, 1925, 1435, 65, 273, 394, 797, 365, 18, 19840, 63, 865, 18, 1925, 1435, 65, 273, 394, 797, 1172, 315, 4728, 3452, 3550, 7945, 738, 72, 358, 738, 87, 6, 738, 261, 865, 18, 1925, 9334, 394, 2 ]
self._permalink_link = make_label(_("Permalink"), self.handle_permalink, info.permalink)
self._permalink_link = make_label(_("Permalink"), self.handle_permalink, info.permalink)
def rebuild_video_details(self): # this removes the child widget if there is one self.remove()
c31cb27865042de3c85675cd19cfff0171c7a3b6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/c31cb27865042de3c85675cd19cfff0171c7a3b6/video.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13419, 67, 9115, 67, 6395, 12, 2890, 4672, 468, 333, 7157, 326, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13419, 67, 9115, 67, 6395, 12, 2890, 4672, 468, 333, 7157, 326, 1151, 3604, 309, 1915, 353, 1245, 365, 18, 4479, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
"Interpreter (PDF)" : 8,
"PDF Interpreter" : 8,
def BuildLog(log_date_command): import os, regex, string reading_description = 0 reading_tags = 0 description = [] log = [] tag_pattern = regex.compile("^ \([^:]+\): \([0-9.]+\)\n$") for line in os.popen(log_date_command, 'r').readlines(): if line[:5] == '=====' or line[:5] == '-----': if description != []: try: my_tags = tags[revision] except KeyError: my_tags = [] log.append(date, author, description, rcs_file, revision, my_tags) reading_description = 0 description = [] continue if reading_description: description.append(line) continue if reading_tags: if tag_pattern.match(line) > 0: tag = tag_pattern.group(1) revs = string.splitfields(tag_pattern.group(2), ", ") for rev in revs: try: tags[rev].append(tag) except KeyError: tags[rev] = [tag] continue reading_tags = 0 if line[:len("Working file: ")] == "Working file: ": rcs_file = line[len("Working file: "):-1] tags = {} elif line[:len("revision ")] == "revision ": revision = line[len("revision "):-1] elif line[:len("date: ")] == "date: ": (dd, aa, ss, ll) = string.splitfields(line, ';') (discard, date) = string.splitfields(dd, ': ') (discard, author) = string.splitfields(aa, ': ') reading_description = 1 elif line[:len("symbolic names:")] == "symbolic names:": reading_tags = 1 return log
59f055fadfc580adbbcabe8dbb54fe1fec145be3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/675/59f055fadfc580adbbcabe8dbb54fe1fec145be3/cvs2hist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3998, 1343, 12, 1330, 67, 712, 67, 3076, 4672, 1930, 1140, 16, 3936, 16, 533, 225, 6453, 67, 3384, 273, 374, 6453, 67, 4156, 273, 374, 2477, 273, 5378, 613, 273, 5378, 1047, 67, 4951, 273, 3936, 18, 11100, 2932, 66, 202, 64, 8178, 30, 26446, 4672, 521, 3816, 20, 17, 29, 18, 26446, 5153, 82, 8, 7923, 225, 364, 980, 316, 1140, 18, 84, 3190, 12, 1330, 67, 712, 67, 3076, 16, 296, 86, 16063, 896, 3548, 13332, 309, 980, 10531, 25, 65, 422, 296, 894, 2218, 578, 980, 10531, 25, 65, 422, 296, 13465, 4278, 309, 2477, 480, 5378, 30, 775, 30, 3399, 67, 4156, 273, 2342, 63, 13057, 65, 1335, 4999, 30, 3399, 67, 4156, 273, 5378, 613, 18, 6923, 12, 712, 16, 2869, 16, 2477, 16, 436, 2143, 67, 768, 16, 6350, 16, 3399, 67, 4156, 13, 6453, 67, 3384, 273, 374, 2477, 273, 5378, 1324, 309, 6453, 67, 3384, 30, 2477, 18, 6923, 12, 1369, 13, 1324, 309, 6453, 67, 4156, 30, 309, 1047, 67, 4951, 18, 1916, 12, 1369, 13, 405, 374, 30, 1047, 273, 1047, 67, 4951, 18, 1655, 12, 21, 13, 5588, 87, 273, 533, 18, 4939, 2821, 12, 2692, 67, 4951, 18, 1655, 12, 22, 3631, 3104, 9369, 364, 5588, 316, 5588, 87, 30, 775, 30, 2342, 63, 9083, 8009, 6923, 12, 2692, 13, 1335, 4999, 30, 2342, 63, 9083, 65, 273, 306, 2692, 65, 1324, 6453, 67, 4156, 273, 374, 309, 980, 10531, 1897, 2932, 14836, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3998, 1343, 12, 1330, 67, 712, 67, 3076, 4672, 1930, 1140, 16, 3936, 16, 533, 225, 6453, 67, 3384, 273, 374, 6453, 67, 4156, 273, 374, 2477, 273, 5378, 613, 273, 5378, 1047, 67, 4951, 273, 3936, 18, 11100, 2932, 66, 202, 64, 8178, 30, 26446, 4672, 521, 3816, 20, 17, 29, 18, 26446, 5153, 82, 8, 7923, 225, 364, 980, 316, 1140, 18, 84, 3190, 12, 1330, 67, 712, 67, 3076, 16, 296, 86, 16063, 896, 3548, 13332, 309, 980, 10531, 25, 65, 422, 296, 894, 2218, 578, 980, 10531, 25, 65, 422, 296, 13465, 4278, 309, 2477, 480, 5378, 30, 775, 30, 3399, 67, 4156, 273, 2342, 63, 13057, 65, 1335, 4999, 30, 3399, 67, 4156, 2 ]
return self.noupdate or (data_node and self.nodeattr2bool(data_node, 'noupdate', False))
return self.noupdate or (len(data_node) and self.nodeattr2bool(data_node, 'noupdate', False))
def isnoupdate(self, data_node=None): return self.noupdate or (data_node and self.nodeattr2bool(data_node, 'noupdate', False))
eef8d5c78831ddd56215d42fee7dbd93294fd0b0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/eef8d5c78831ddd56215d42fee7dbd93294fd0b0/convert.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 2135, 2725, 12, 2890, 16, 501, 67, 2159, 33, 7036, 4672, 327, 365, 18, 2135, 2725, 578, 261, 892, 67, 2159, 471, 365, 18, 2159, 1747, 22, 6430, 12, 892, 67, 2159, 16, 296, 2135, 2725, 2187, 1083, 3719, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 2135, 2725, 12, 2890, 16, 501, 67, 2159, 33, 7036, 4672, 327, 365, 18, 2135, 2725, 578, 261, 892, 67, 2159, 471, 365, 18, 2159, 1747, 22, 6430, 12, 892, 67, 2159, 16, 296, 2135, 2725, 2187, 1083, 3719, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
return for s in pool:
i = 0 for s in self.pool:
def test_deps(self): return for s in pool: print s show_dep( "Provides", s.provides()) show_dep( "Requires", s.requires()) show_dep( "Obsoletes", s.obsoletes()) show_dep( "Conflicts", s.conflicts())
5da0b00f1b3ba7a3e6ecb1aa1ac4bd208e0e1932 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14459/5da0b00f1b3ba7a3e6ecb1aa1ac4bd208e0e1932/solvable.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 14877, 12, 2890, 4672, 277, 273, 374, 364, 272, 316, 365, 18, 6011, 30, 1172, 272, 2405, 67, 15037, 12, 315, 17727, 3113, 272, 18, 685, 13427, 10756, 2405, 67, 15037, 12, 315, 21671, 3113, 272, 18, 18942, 10756, 2405, 67, 15037, 12, 315, 27637, 355, 278, 281, 3113, 272, 18, 10992, 355, 278, 281, 10756, 2405, 67, 15037, 12, 315, 30897, 3113, 272, 18, 20340, 87, 10756, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 14877, 12, 2890, 4672, 277, 273, 374, 364, 272, 316, 365, 18, 6011, 30, 1172, 272, 2405, 67, 15037, 12, 315, 17727, 3113, 272, 18, 685, 13427, 10756, 2405, 67, 15037, 12, 315, 21671, 3113, 272, 18, 18942, 10756, 2405, 67, 15037, 12, 315, 27637, 355, 278, 281, 3113, 272, 18, 10992, 355, 278, 281, 10756, 2405, 67, 15037, 12, 315, 30897, 3113, 272, 18, 20340, 87, 10756, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
"\n\n(Currently using %r)") % (version, e.args[0])
"\n\n(Currently using %r)\n" % (version, e.args[0]))
def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, download_delay=15, no_fake=False): # making sure we use the absolute path to_dir = os.path.abspath(to_dir) was_imported = 'pkg_resources' in sys.modules or \ 'setuptools' in sys.modules try: try: import pkg_resources if not hasattr(pkg_resources, '_distribute'): if not no_fake: fake_setuptools() raise ImportError except ImportError: return _do_download(version, download_base, to_dir, download_delay) try: pkg_resources.require("distribute>="+version) return except pkg_resources.VersionConflict, e: if was_imported: print >>sys.stderr, ( "The required version of distribute (>=%s) is not available,\n" "and can't be installed while this script is running. Please\n" "install a more recent version first, using\n" "'easy_install -U distribute'." "\n\n(Currently using %r)") % (version, e.args[0]) sys.exit(2) else: del pkg_resources, sys.modules['pkg_resources'] # reload ok return _do_download(version, download_base, to_dir, download_delay) except pkg_resources.DistributionNotFound: return _do_download(version, download_base, to_dir, download_delay) finally: _create_fake_setuptools_pkg_info(to_dir)
7785ccade4b92867c492f573e9b548c1ba612cd7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/495/7785ccade4b92867c492f573e9b548c1ba612cd7/distribute_setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 999, 67, 542, 30693, 12, 1589, 33, 5280, 67, 5757, 16, 4224, 67, 1969, 33, 5280, 67, 1785, 16, 358, 67, 1214, 33, 538, 18, 1397, 1214, 16, 4224, 67, 10790, 33, 3600, 16, 1158, 67, 28395, 33, 8381, 4672, 468, 10480, 3071, 732, 999, 326, 4967, 589, 358, 67, 1214, 273, 1140, 18, 803, 18, 5113, 803, 12, 869, 67, 1214, 13, 1703, 67, 29266, 273, 296, 10657, 67, 4683, 11, 316, 2589, 18, 6400, 578, 521, 296, 542, 30693, 11, 316, 2589, 18, 6400, 775, 30, 775, 30, 1930, 3475, 67, 4683, 309, 486, 3859, 12, 10657, 67, 4683, 16, 2070, 2251, 887, 11, 4672, 309, 486, 1158, 67, 28395, 30, 10517, 67, 542, 30693, 1435, 1002, 11308, 1335, 11308, 30, 327, 389, 2896, 67, 7813, 12, 1589, 16, 4224, 67, 1969, 16, 358, 67, 1214, 16, 4224, 67, 10790, 13, 775, 30, 3475, 67, 4683, 18, 6528, 2932, 2251, 887, 34, 1546, 15, 1589, 13, 327, 1335, 3475, 67, 4683, 18, 1444, 10732, 16, 425, 30, 309, 1703, 67, 29266, 30, 1172, 1671, 9499, 18, 11241, 16, 261, 315, 1986, 1931, 1177, 434, 25722, 261, 34, 5095, 87, 13, 353, 486, 2319, 17211, 82, 6, 315, 464, 848, 1404, 506, 5876, 1323, 333, 2728, 353, 3549, 18, 7801, 64, 82, 6, 315, 5425, 279, 1898, 8399, 1177, 1122, 16, 1450, 64, 82, 6, 2491, 73, 15762, 67, 5425, 300, 57, 25722, 14550, 1548, 82, 64, 82, 12, 3935, 715, 1450, 738, 86, 5153, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 999, 67, 542, 30693, 12, 1589, 33, 5280, 67, 5757, 16, 4224, 67, 1969, 33, 5280, 67, 1785, 16, 358, 67, 1214, 33, 538, 18, 1397, 1214, 16, 4224, 67, 10790, 33, 3600, 16, 1158, 67, 28395, 33, 8381, 4672, 468, 10480, 3071, 732, 999, 326, 4967, 589, 358, 67, 1214, 273, 1140, 18, 803, 18, 5113, 803, 12, 869, 67, 1214, 13, 1703, 67, 29266, 273, 296, 10657, 67, 4683, 11, 316, 2589, 18, 6400, 578, 521, 296, 542, 30693, 11, 316, 2589, 18, 6400, 775, 30, 775, 30, 1930, 3475, 67, 4683, 309, 486, 3859, 12, 10657, 67, 4683, 16, 2070, 2251, 887, 11, 4672, 309, 486, 1158, 67, 28395, 30, 10517, 67, 542, 30693, 1435, 2 ]
eps -- character
$\epsilon$ -- character
def CO_delta(r,p,N,eps): """ Compute the delta function in the paper of Cohen and Oesterle on dimension formulas. INPUT: r -- positive integer p -- a prime N -- positive integer eps -- character OUTPUT: element of the base ring of the character EXAMPLES: sage: G.<eps> = DirichletGroup(7) sage: sage.modular.dims.CO_delta(1,5,7,eps^3) 2 """ if not is_prime(p): raise ValueError, "p must be prime" K = eps.base_ring() if p%4 == 3: return K(0) if p==2: if r==1: return K(1) return K(0) # interesting case: p=1(mod 4). # omega is a primitive 4th root of unity mod p. omega = (IntegerModRing(p).unit_gens()[0])**((p-1)//4) # this n is within a p-power root of a "local" 4th root of 1 modulo p. n = Mod(int(omega.crt(Mod(1,N//(p**r)))),N) n = n**(p**(r-1)) # this is correct now t = eps(n) if t==K(1): return K(2) if t==K(-1): return K(-2) return K(0)
231200694940d44e11baa531020b171931c64488 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/231200694940d44e11baa531020b171931c64488/dims.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7910, 67, 9878, 12, 86, 16, 84, 16, 50, 16, 13058, 4672, 3536, 8155, 326, 3622, 445, 316, 326, 15181, 434, 7695, 76, 275, 471, 531, 7654, 298, 603, 4968, 646, 24857, 18, 225, 12943, 30, 436, 1493, 6895, 3571, 293, 1493, 279, 17014, 423, 1493, 6895, 3571, 271, 64, 13058, 10327, 8, 1493, 3351, 225, 11550, 30, 930, 434, 326, 1026, 9221, 434, 326, 3351, 225, 5675, 8900, 11386, 30, 272, 410, 30, 611, 22782, 13058, 34, 273, 8446, 1354, 1810, 1114, 12, 27, 13, 272, 410, 30, 272, 410, 18, 1711, 2490, 18, 8550, 18, 3865, 67, 9878, 12, 21, 16, 25, 16, 27, 16, 13058, 66, 23, 13, 576, 3536, 309, 486, 353, 67, 16382, 12, 84, 4672, 1002, 2068, 16, 315, 84, 1297, 506, 17014, 6, 1475, 273, 7785, 18, 1969, 67, 8022, 1435, 309, 293, 9, 24, 422, 890, 30, 327, 1475, 12, 20, 13, 309, 293, 631, 22, 30, 309, 436, 631, 21, 30, 327, 1475, 12, 21, 13, 327, 1475, 12, 20, 13, 468, 26122, 648, 30, 293, 33, 21, 12, 1711, 1059, 2934, 468, 17220, 353, 279, 8225, 1059, 451, 1365, 434, 640, 560, 681, 293, 18, 17220, 273, 261, 4522, 1739, 10369, 12, 84, 2934, 4873, 67, 23730, 1435, 63, 20, 5717, 636, 12443, 84, 17, 21, 13, 759, 24, 13, 468, 333, 290, 353, 3470, 279, 293, 17, 12238, 1365, 434, 279, 315, 3729, 6, 1059, 451, 1365, 434, 404, 26109, 293, 18, 290, 273, 3431, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7910, 67, 9878, 12, 86, 16, 84, 16, 50, 16, 13058, 4672, 3536, 8155, 326, 3622, 445, 316, 326, 15181, 434, 7695, 76, 275, 471, 531, 7654, 298, 603, 4968, 646, 24857, 18, 225, 12943, 30, 436, 1493, 6895, 3571, 293, 1493, 279, 17014, 423, 1493, 6895, 3571, 271, 64, 13058, 10327, 8, 1493, 3351, 225, 11550, 30, 930, 434, 326, 1026, 9221, 434, 326, 3351, 225, 5675, 8900, 11386, 30, 272, 410, 30, 611, 22782, 13058, 34, 273, 8446, 1354, 1810, 1114, 12, 27, 13, 272, 410, 30, 272, 410, 18, 1711, 2490, 18, 8550, 18, 3865, 67, 9878, 12, 21, 16, 25, 16, 27, 16, 13058, 66, 23, 13, 576, 3536, 309, 486, 353, 67, 16382, 2 ]
requirements = ("revlogv1", "store") else: requirements = ("revlogv1")
requirements.append("store") self.opener("00changelog.i", "a").write( '\0\0\0\2' ' dummy changelog to prevent using the old repo layout' )
def __init__(self, parentui, path=None, create=0): repo.repository.__init__(self) if not path: p = os.getcwd() while not os.path.isdir(os.path.join(p, ".hg")): oldp = p p = os.path.dirname(p) if p == oldp: raise repo.RepoError(_("There is no Mercurial repository" " here (.hg not found)")) path = p
a916f13af4c84ba52ad155003aaf788abe9273a8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11312/a916f13af4c84ba52ad155003aaf788abe9273a8/localrepo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 4881, 16, 589, 33, 7036, 16, 752, 33, 20, 4672, 3538, 18, 9071, 16186, 2738, 972, 12, 2890, 13, 309, 486, 589, 30, 293, 273, 1140, 18, 588, 11089, 1435, 1323, 486, 1140, 18, 803, 18, 291, 1214, 12, 538, 18, 803, 18, 5701, 12, 84, 16, 3552, 26981, 6, 3719, 30, 1592, 84, 273, 293, 293, 273, 1140, 18, 803, 18, 12287, 12, 84, 13, 309, 293, 422, 1592, 84, 30, 1002, 3538, 18, 8791, 668, 24899, 2932, 9828, 353, 1158, 14940, 1397, 649, 3352, 6, 315, 2674, 261, 18, 26981, 486, 1392, 2225, 3719, 589, 273, 293, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 972, 12, 2890, 13, 309, 486, 589, 30, 293, 273, 1140, 18, 588, 11089, 1435, 1323, 486, 1140, 18, 803, 18, 291, 1214, 12, 538, 18, 803, 18, 5701, 12, 84, 16, 3552, 26981, 6, 3719, 30, 1592, 84, 273, 293, 293, 273, 1140, 18, 803, 18, 12287, 12, 84, 13, 309, 293, 422, 1592, 84, 30, 1002, 3538, 18, 8791, 668, 24899, 2932, 9828, 353, 1158, 14940, 1397, 649, 3352, 6, 315, 2674, 261, 18, 26981, 486, 1392, 2225, 3719, 589, 273, 293, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
self._instances[window].deactivate() del self._instances[window]
if window in self._instances: self._instances[window].deactivate() del self._instances[window]
def deactivate(self, window): widgets = [window] + window.get_views() for widget in widgets: handler_ids = widget.get_data(self.id_name) if handler_ids is not None: for handler_id in handler_ids: widget.disconnect(handler_id) widget.set_data(self.id_name, None)
a5dd362ab206c001a21114d2bb5c099cbf02c1c0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5119/a5dd362ab206c001a21114d2bb5c099cbf02c1c0/rabbitvcs-plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18790, 12, 2890, 16, 2742, 4672, 10965, 273, 306, 5668, 65, 397, 2742, 18, 588, 67, 7061, 1435, 364, 3604, 316, 10965, 30, 1838, 67, 2232, 273, 3604, 18, 588, 67, 892, 12, 2890, 18, 350, 67, 529, 13, 309, 1838, 67, 2232, 353, 486, 599, 30, 364, 1838, 67, 350, 316, 1838, 67, 2232, 30, 3604, 18, 20177, 12, 4176, 67, 350, 13, 3604, 18, 542, 67, 892, 12, 2890, 18, 350, 67, 529, 16, 599, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18790, 12, 2890, 16, 2742, 4672, 10965, 273, 306, 5668, 65, 397, 2742, 18, 588, 67, 7061, 1435, 364, 3604, 316, 10965, 30, 1838, 67, 2232, 273, 3604, 18, 588, 67, 892, 12, 2890, 18, 350, 67, 529, 13, 309, 1838, 67, 2232, 353, 486, 599, 30, 364, 1838, 67, 350, 316, 1838, 67, 2232, 30, 3604, 18, 20177, 12, 4176, 67, 350, 13, 3604, 18, 542, 67, 892, 12, 2890, 18, 350, 67, 529, 16, 599, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
np_root = os.listdir(lio_root + "/" + iqn + "/tpgt_" + tpgt + "/np") for np in np_root: np_val = [iqn,tpgt,np] lio_target_del_np(None, None, np_val, None) nacl_root = os.listdir(lio_root + "/" + iqn + "/tpgt_" + tpgt + "/acls") for nacl in nacl_root: nacl_val = [iqn,tpgt,nacl] lio_target_del_nodeacl(None, None, nacl_val, None) lun_root = os.listdir(lio_root + "/" + iqn + "/tpgt_" + tpgt + "/lun") for lun_tmp in lun_root: lun_tmp2 = lun_tmp.split('_') lun = lun_tmp2[1] lun_val = [iqn,tpgt,lun] if delete_tpg_md == 1: lio_target_del_port(None, None, lun_val, None) else: __lio_target_del_port(None, None, lun_val, None)
def __lio_target_del_iqn(option, opt_str, value, parser, delete_tpg_md): iqn = str(value); iqn = iqn.lower();
ea3761ed38da7ac34381d247f75ab501a307aa08 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8449/ea3761ed38da7ac34381d247f75ab501a307aa08/lio_node.py
[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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 549, 83, 67, 3299, 67, 3771, 67, 77, 15785, 12, 3482, 16, 2153, 67, 701, 16, 460, 16, 2082, 16, 1430, 67, 6834, 75, 67, 1264, 4672, 277, 15785, 273, 609, 12, 1132, 1769, 277, 15785, 273, 277, 15785, 18, 8167, 5621, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
print items[i]; i+=1
b = items[i]; i+=1
def tightloop_example(): items = range(0, 3) try: i = 0 while 1: print items[i]; i+=1 except IndexError: pass
84f2a558f8d114786c89e5b8c3bca4c18df3a78c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/84f2a558f8d114786c89e5b8c3bca4c18df3a78c/test_trace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26066, 6498, 67, 8236, 13332, 1516, 273, 1048, 12, 20, 16, 890, 13, 775, 30, 277, 273, 374, 1323, 404, 30, 324, 273, 1516, 63, 77, 15533, 277, 15, 33, 21, 1335, 10195, 30, 1342, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26066, 6498, 67, 8236, 13332, 1516, 273, 1048, 12, 20, 16, 890, 13, 775, 30, 277, 273, 374, 1323, 404, 30, 324, 273, 1516, 63, 77, 15533, 277, 15, 33, 21, 1335, 10195, 30, 1342, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
def __init__(self, server, share, username, password, domain=None, resolve_order=None, port=None, ip=None, terminal_code=None, buffer_size=None, debug_level=None, config_file=None, logdir=None, netbios_name=None):
def __init__(self, server, share, username=None, password=None, domain=None, resolve_order=None, port=None, ip=None, terminal_code=None, buffer_size=None, debug_level=None, config_file=None, logdir=None, netbios_name=None, kerberos=False): self._unlink = os.unlink
def __init__(self, server, share, username, password, domain=None, resolve_order=None, port=None, ip=None, terminal_code=None, buffer_size=None, debug_level=None, config_file=None, logdir=None, netbios_name=None): self.path = '//%s/%s' % (server, share) smbclient_cmd = ['smbclient', self.path] if resolve_order: smbclient_cmd.extend(['-R', ' '.join(resolve_order)]) if port: smbclient_cmd.extend(['-p', str(port)]) if ip: smbclient_cmd.extend(['-I', ip]) # -E: use stderr # -L: look if terminal_code: smbclient_cmd.extend(['-t', terminal_code]) if buffer_size: smbclient_cmd.extend(['-b', str(buffer_size)]) if debug_level: smbclient_cmd.extend(['-d', str(debug_level)]) if config_file: smbclient_cmd.extend(['-s', config_file]) if logdir: smbclient_cmd.extend(['-l', logdir]) self.auth = {'username': username} if domain: self.auth['domain'] = domain if password: self.auth['password'] = password else: smbclient_cmd.append('-N') self.auth_file = tempfile.NamedTemporaryFile(prefix="smb.auth.", delete=False) self.auth_file.write('\n'.join('%s=%s' % (k, v) for k, v in self.auth.iteritems())) self.auth_file.close() self._unlink = os.unlink # keep a ref to unlink for future use smbclient_cmd.extend(['-A', self.auth_file.name]) if netbios_name: smbclient_cmd.extend(['-n', netbios_name]) self._smbclient_cmd = smbclient_cmd self._open_files = weakref.WeakKeyDictionary()
0cc9ce95c8d6240dc05a18ea433fbaa139c946dc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5944/0cc9ce95c8d6240dc05a18ea433fbaa139c946dc/smbclient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1438, 16, 7433, 16, 2718, 33, 7036, 16, 2201, 33, 7036, 16, 2461, 33, 7036, 16, 2245, 67, 1019, 33, 7036, 16, 1756, 33, 7036, 16, 2359, 33, 7036, 16, 8651, 67, 710, 33, 7036, 16, 1613, 67, 1467, 33, 7036, 16, 1198, 67, 2815, 33, 7036, 16, 642, 67, 768, 33, 7036, 16, 613, 1214, 33, 7036, 16, 2901, 70, 7441, 67, 529, 33, 7036, 16, 417, 24704, 33, 8381, 4672, 365, 6315, 318, 1232, 273, 1140, 18, 318, 1232, 365, 18, 803, 273, 12084, 9, 87, 5258, 87, 11, 738, 261, 3567, 16, 7433, 13, 272, 1627, 2625, 67, 4172, 273, 10228, 87, 1627, 2625, 2187, 365, 18, 803, 65, 309, 2245, 67, 1019, 30, 272, 1627, 2625, 67, 4172, 18, 14313, 12, 3292, 17, 54, 2187, 296, 2418, 5701, 12, 10828, 67, 1019, 13, 5717, 309, 1756, 30, 272, 1627, 2625, 67, 4172, 18, 14313, 12, 3292, 17, 84, 2187, 609, 12, 655, 13, 5717, 309, 2359, 30, 272, 1627, 2625, 67, 4172, 18, 14313, 12, 3292, 17, 45, 2187, 2359, 5717, 468, 300, 41, 30, 999, 4514, 468, 300, 48, 30, 2324, 309, 8651, 67, 710, 30, 272, 1627, 2625, 67, 4172, 18, 14313, 12, 3292, 17, 88, 2187, 8651, 67, 710, 5717, 309, 1613, 67, 1467, 30, 272, 1627, 2625, 67, 4172, 18, 14313, 12, 3292, 17, 70, 2187, 609, 12, 4106, 67, 1467, 13, 5717, 309, 1198, 67, 2815, 30, 272, 1627, 2625, 67, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1438, 16, 7433, 16, 2718, 33, 7036, 16, 2201, 33, 7036, 16, 2461, 33, 7036, 16, 2245, 67, 1019, 33, 7036, 16, 1756, 33, 7036, 16, 2359, 33, 7036, 16, 8651, 67, 710, 33, 7036, 16, 1613, 67, 1467, 33, 7036, 16, 1198, 67, 2815, 33, 7036, 16, 642, 67, 768, 33, 7036, 16, 613, 1214, 33, 7036, 16, 2901, 70, 7441, 67, 529, 33, 7036, 16, 417, 24704, 33, 8381, 4672, 365, 6315, 318, 1232, 273, 1140, 18, 318, 1232, 365, 18, 803, 273, 12084, 9, 87, 5258, 87, 11, 738, 261, 3567, 16, 7433, 13, 272, 1627, 2625, 67, 4172, 273, 10228, 87, 1627, 2625, 2187, 365, 18, 803, 65, 2 ]
or ordinary_args[-1] != call.starargs.name):
or node.args.vararg != call.starargs.name):
def visit_lambda(self, node): """check whether or not the lambda is suspicious """ # if the body of the lambda is a call expression with the same # argument list as the lambda itself, then the lambda is # possibly unnecessary and at least suspicious. if node.args.defaults: # If the arguments of the lambda include defaults, then a # judgment cannot be made because there is no way to check # that the defaults defined by the lambda are the same as # the defaults defined by the function called in the body # of the lambda. return call = node.body if not isinstance(call, astng.CallFunc): # The body of the lambda must be a function call expression # for the lambda to be unnecessary. return # XXX are lambda still different with astng >= 0.18 ? # *args and **kwargs need to be treated specially, since they # are structured differently between the lambda and the function # call (in the lambda they appear in the args.args list and are # indicated as * and ** by two bits in the lambda's flags, but # in the function call they are omitted from the args list and # are indicated by separate attributes on the function call node). ordinary_args = list(node.args.args) if node.flags & compiler.consts.CO_VARKEYWORDS: if (not call.kwargs or not isinstance(call.kwargs, astng.Name) or ordinary_args[-1] != call.kwargs.name): return ordinary_args = ordinary_args[:-1] if node.flags & compiler.consts.CO_VARARGS: if (not call.starargs or not isinstance(call.starargs, astng.Name) or ordinary_args[-1] != call.starargs.name): return ordinary_args = ordinary_args[:-1]
c77323ce1430c8a37dfce3b1dfe4d549c786be1a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/928/c77323ce1430c8a37dfce3b1dfe4d549c786be1a/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 14661, 12, 2890, 16, 756, 4672, 3536, 1893, 2856, 578, 486, 326, 3195, 353, 11375, 84, 28728, 3536, 468, 309, 326, 1417, 434, 326, 3195, 353, 279, 745, 2652, 598, 326, 1967, 468, 1237, 666, 487, 326, 3195, 6174, 16, 1508, 326, 3195, 353, 468, 10016, 19908, 471, 622, 4520, 11375, 84, 28728, 18, 309, 756, 18, 1968, 18, 7606, 30, 468, 971, 326, 1775, 434, 326, 3195, 2341, 3467, 16, 1508, 279, 468, 525, 1100, 75, 475, 2780, 506, 7165, 2724, 1915, 353, 1158, 4031, 358, 866, 468, 716, 326, 3467, 2553, 635, 326, 3195, 854, 326, 1967, 487, 468, 326, 3467, 2553, 635, 326, 445, 2566, 316, 326, 1417, 468, 434, 326, 3195, 18, 327, 745, 273, 756, 18, 3432, 309, 486, 1549, 12, 1991, 16, 3364, 3368, 18, 1477, 2622, 4672, 468, 1021, 1417, 434, 326, 3195, 1297, 506, 279, 445, 745, 2652, 468, 364, 326, 3195, 358, 506, 19908, 18, 327, 468, 11329, 854, 3195, 4859, 3775, 598, 3364, 3368, 1545, 374, 18, 2643, 692, 468, 380, 1968, 471, 2826, 4333, 1608, 358, 506, 13974, 857, 6261, 16, 3241, 2898, 468, 854, 19788, 23621, 3086, 326, 3195, 471, 326, 445, 468, 745, 261, 267, 326, 3195, 2898, 9788, 316, 326, 833, 18, 1968, 666, 471, 854, 468, 17710, 487, 380, 471, 2826, 635, 2795, 4125, 316, 326, 3195, 1807, 2943, 16, 1496, 468, 316, 326, 445, 745, 2898, 854, 16195, 628, 326, 833, 666, 471, 468, 854, 17710, 635, 9004, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 14661, 12, 2890, 16, 756, 4672, 3536, 1893, 2856, 578, 486, 326, 3195, 353, 11375, 84, 28728, 3536, 468, 309, 326, 1417, 434, 326, 3195, 353, 279, 745, 2652, 598, 326, 1967, 468, 1237, 666, 487, 326, 3195, 6174, 16, 1508, 326, 3195, 353, 468, 10016, 19908, 471, 622, 4520, 11375, 84, 28728, 18, 309, 756, 18, 1968, 18, 7606, 30, 468, 971, 326, 1775, 434, 326, 3195, 2341, 3467, 16, 1508, 279, 468, 525, 1100, 75, 475, 2780, 506, 7165, 2724, 1915, 353, 1158, 4031, 358, 866, 468, 716, 326, 3467, 2553, 635, 326, 3195, 854, 326, 1967, 487, 468, 326, 3467, 2553, 635, 326, 445, 2566, 316, 326, 1417, 468, 434, 326, 3195, 18, 2 ]
words = split(str, pat, 1)
words = splitx(str, pat)
def capwords(str, pat): import string words = split(str, pat, 1) for i in range(0, len(words), 2): words[i] = string.capitalize(words[i]) return string.joinfields(words, "")
7a7d5d8fcf5ac8f9eaf8016da04984687e43dae3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7a7d5d8fcf5ac8f9eaf8016da04984687e43dae3/regsub.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3523, 3753, 12, 701, 16, 9670, 4672, 1930, 533, 4511, 273, 1416, 92, 12, 701, 16, 9670, 13, 364, 277, 316, 1048, 12, 20, 16, 562, 12, 3753, 3631, 576, 4672, 4511, 63, 77, 65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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3523, 3753, 12, 701, 16, 9670, 4672, 1930, 533, 4511, 273, 1416, 92, 12, 701, 16, 9670, 13, 364, 277, 316, 1048, 12, 20, 16, 562, 12, 3753, 3631, 576, 4672, 4511, 63, 77, 65, 273, 533, 18, 5909, 7053, 554, 12, 3753, 63, 77, 5717, 327, 533, 18, 5701, 2821, 12, 3753, 16, 1408, 13, 282, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
''' display an item ''' if self.user in ('admin', self.db.user.get(self.nodeid, 'username')): self.shownode(message) else:
'''Display a user page for editing. Make sure the user is allowed to edit this node, and also check for password changes. ''' if self.user == 'anonymous':
def showuser(self, message=None): ''' display an item ''' if self.user in ('admin', self.db.user.get(self.nodeid, 'username')): self.shownode(message) else: raise Unauthorised
eefa56ffe30ec68716804654903256c037e11c83 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/eefa56ffe30ec68716804654903256c037e11c83/cgi_client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 1355, 12, 2890, 16, 883, 33, 7036, 4672, 9163, 4236, 279, 729, 1363, 364, 15755, 18, 4344, 3071, 326, 729, 353, 2935, 358, 3874, 333, 756, 16, 471, 2546, 866, 364, 2201, 3478, 18, 9163, 309, 365, 18, 1355, 422, 296, 19070, 4278, 1002, 1351, 4161, 5918, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 1355, 12, 2890, 16, 883, 33, 7036, 4672, 9163, 4236, 279, 729, 1363, 364, 15755, 18, 4344, 3071, 326, 729, 353, 2935, 358, 3874, 333, 756, 16, 471, 2546, 866, 364, 2201, 3478, 18, 9163, 309, 365, 18, 1355, 422, 296, 19070, 4278, 1002, 1351, 4161, 5918, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
def getattr(self,path): st = self.getattr_(path) now = time.time() limit = now+1000 assert st.st_atime>limit/2 assert st.st_atime<limit assert st.st_mtime>limit/2 assert st.st_mtime<limit assert st.st_ctime>limit/2 assert st.st_ctime<limit return st
def getattr(self,path): st = self.getattr_(path) now = time.time() limit = now+1000 assert st.st_atime>limit/2 assert st.st_atime<limit assert st.st_mtime>limit/2 assert st.st_mtime<limit assert st.st_ctime>limit/2 assert st.st_ctime<limit return st
65ab0457cf6e931cfd53b05334d23b48cbfb5e68 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5937/65ab0457cf6e931cfd53b05334d23b48cbfb5e68/archivefs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3869, 12, 2890, 16, 803, 4672, 384, 273, 365, 18, 588, 1747, 67, 12, 803, 13, 2037, 273, 813, 18, 957, 1435, 1800, 273, 2037, 15, 18088, 1815, 384, 18, 334, 67, 270, 494, 34, 3595, 19, 22, 1815, 384, 18, 334, 67, 270, 494, 32, 3595, 1815, 384, 18, 334, 67, 10838, 34, 3595, 19, 22, 1815, 384, 18, 334, 67, 10838, 32, 3595, 1815, 384, 18, 334, 67, 21261, 34, 3595, 19, 22, 1815, 384, 18, 334, 67, 21261, 32, 3595, 327, 384, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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22, 1815, 384, 18, 334, 67, 270, 494, 32, 3595, 1815, 384, 18, 334, 67, 10838, 34, 3595, 19, 22, 1815, 384, 18, 334, 67, 10838, 32, 3595, 1815, 384, 18, 334, 67, 21261, 34, 3595, 19, 22, 1815, 384, 18, 334, 67, 21261, 32, 3595, 327, 384, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
dataset = ''
def runPandaBrokerage(job): # get locations when site==AUTO if job.backend.site == "AUTO": libdslocation = [] if job.backend.libds: try: libdslocation = Client.getLocations(job.backend.libds,[],job.backend.requirements.cloud,False,False) except exceptions.SystemExit: raise BackendError('Panda','Error in Client.getLocations for libDS') if not libdslocation: raise ApplicationConfigurationError(None,'Could not locate libDS %s'%job.backend.libds) else: libdslocation = libdslocation.values()[0] tmpSites = [] if job.inputdata: dataset = '' try: dataset = job.inputdata.dataset[0] except: try: dataset = job.inputdata.DQ2dataset except: raise ApplicationConfigurationError(None,'Could not determine input datasetname for Panda brokerage') if not dataset: raise ApplicationConfigurationError(None,'Could not determine input datasetname for Panda brokerage') fileList = [] try: fileList = Client.queryFilesInDataset(dataset,False) except exceptions.SystemExit: raise BackendError('Panda','Error in Client.queryFilesInDataset') try: dsLocationMap = Client.getLocations(dataset,fileList,job.backend.requirements.cloud,False,False,expCloud=True) except exceptions.SystemExit: raise BackendError('Panda','Error in Client.getLocations') # no location if dsLocationMap == {}: raise BackendError('Panda',"ERROR : could not find supported locations in the %s cloud for %s" % (job.backend.requirements.cloud,job.inputdata.dataset[0])) # run brokerage for tmpItem in dsLocationMap.values(): if not libdslocation or tmpItem == libdslocation: tmpSites.append(tmpItem[0]) else: for site,spec in Client.PandaSites.iteritems(): if spec['cloud']==job.backend.requirements.cloud and spec['status']=='online' and not Client.isExcudedSite(site): if not libdslocation or site == libdslocation: tmpSites.append(site) if not tmpSites: raise BackendError('Panda',"ERROR : could not find supported locations in the %s cloud for %s, %s" % (job.backend.requirements.cloud,job.inputdata.dataset,job.backend.libds)) tag = '' try: tag = 'Atlas-%s' % job.application.atlas_release except: pass try: status,out = Client.runBrokerage(tmpSites,tag,verbose=False,trustIS=config['trustIS']) except exceptions.SystemExit: raise BackendError('Panda','Exception in Client.runBrokerage: %s %s'%(sys.exc_info()[0],sys.exc_info()[1])) if status != 0: raise BackendError('Panda','Non-zero to run brokerage for automatic assignment: %s' % out) if not Client.PandaSites.has_key(out): raise BackendError('Panda','brokerage gave wrong PandaSiteID:%s' % out) # set site job.backend.site = out # patch for BNL if job.backend.site == "ANALY_BNL": job.backend.site = "ANALY_BNL_ATLAS_1" # long queue if job.backend.requirements.long: job.backend.site = re.sub('ANALY_','ANALY_LONG_',job.backend.site) job.backend.actualCE = job.backend.site # correct the cloud in case site was not AUTO job.backend.requirements.cloud = Client.PandaSites[job.backend.site]['cloud'] logger.info('Panda brokerage results: cloud %s, site %s'%(job.backend.requirements.cloud,job.backend.site))
3f526908c9f22ead6d732694154b735c755d32c5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1488/3f526908c9f22ead6d732694154b735c755d32c5/Panda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 52, 464, 69, 11194, 410, 12, 4688, 4672, 468, 336, 7838, 1347, 2834, 631, 18909, 225, 309, 1719, 18, 9993, 18, 4256, 422, 315, 18909, 6877, 2561, 2377, 3562, 273, 5378, 309, 1719, 18, 9993, 18, 2941, 2377, 30, 775, 30, 2561, 2377, 3562, 273, 2445, 18, 588, 10985, 12, 4688, 18, 9993, 18, 2941, 2377, 16, 63, 6487, 4688, 18, 9993, 18, 16175, 18, 7277, 16, 8381, 16, 8381, 13, 1335, 4798, 18, 22729, 30, 1002, 11736, 668, 2668, 52, 464, 69, 17023, 668, 316, 2445, 18, 588, 10985, 364, 2561, 3948, 6134, 309, 486, 2561, 2377, 3562, 30, 1002, 4257, 1750, 668, 12, 7036, 11189, 4445, 486, 10627, 2561, 3948, 738, 87, 11, 9, 4688, 18, 9993, 18, 2941, 2377, 13, 469, 30, 2561, 2377, 3562, 273, 2561, 2377, 3562, 18, 2372, 1435, 63, 20, 65, 225, 1853, 17055, 273, 5378, 309, 1719, 18, 2630, 892, 30, 775, 30, 3709, 273, 1719, 18, 2630, 892, 18, 8682, 63, 20, 65, 1335, 30, 775, 30, 3709, 273, 1719, 18, 2630, 892, 18, 40, 53, 22, 8682, 1335, 30, 1002, 4257, 1750, 668, 12, 7036, 11189, 4445, 486, 4199, 810, 3709, 529, 364, 453, 464, 69, 8625, 410, 6134, 309, 486, 3709, 30, 1002, 4257, 1750, 668, 12, 7036, 11189, 4445, 486, 4199, 810, 3709, 529, 364, 453, 464, 69, 8625, 410, 6134, 225, 18645, 273, 5378, 775, 30, 18645, 225, 273, 2445, 18, 2271, 2697, 382, 10656, 12, 8682, 16, 8381, 13, 1335, 4798, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 52, 464, 69, 11194, 410, 12, 4688, 4672, 468, 336, 7838, 1347, 2834, 631, 18909, 225, 309, 1719, 18, 9993, 18, 4256, 422, 315, 18909, 6877, 2561, 2377, 3562, 273, 5378, 309, 1719, 18, 9993, 18, 2941, 2377, 30, 775, 30, 2561, 2377, 3562, 273, 2445, 18, 588, 10985, 12, 4688, 18, 9993, 18, 2941, 2377, 16, 63, 6487, 4688, 18, 9993, 18, 16175, 18, 7277, 16, 8381, 16, 8381, 13, 1335, 4798, 18, 22729, 30, 1002, 11736, 668, 2668, 52, 464, 69, 17023, 668, 316, 2445, 18, 588, 10985, 364, 2561, 3948, 6134, 309, 486, 2561, 2377, 3562, 30, 1002, 4257, 1750, 668, 12, 7036, 11189, 4445, 486, 10627, 2561, 3948, 738, 87, 11, 9, 4688, 2 ]
self.assertEqual(self.errorState, 2)
self.assertEqual(self.errorState, 2, "Expected call to onerror function did not happen.")
def test_on_error(self): self.errorState = 0 os.mkdir(TESTFN) self.childpath = os.path.join(TESTFN, 'a') f = open(self.childpath, 'w') f.close() old_dir_mode = os.stat(TESTFN).st_mode old_child_mode = os.stat(self.childpath).st_mode # Make unwritable. os.chmod(self.childpath, stat.S_IREAD) os.chmod(TESTFN, stat.S_IREAD)
6cd995c93d9db4d926bd2bc7899c3314971b4ad2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/6cd995c93d9db4d926bd2bc7899c3314971b4ad2/test_shutil.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 265, 67, 1636, 12, 2890, 4672, 365, 18, 1636, 1119, 273, 374, 1140, 18, 26686, 12, 16961, 19793, 13, 365, 18, 3624, 803, 273, 1140, 18, 803, 18, 5701, 12, 16961, 19793, 16, 296, 69, 6134, 284, 273, 1696, 12, 2890, 18, 3624, 803, 16, 296, 91, 6134, 284, 18, 4412, 1435, 1592, 67, 1214, 67, 3188, 273, 1140, 18, 5642, 12, 16961, 19793, 2934, 334, 67, 3188, 1592, 67, 3624, 67, 3188, 273, 1140, 18, 5642, 12, 2890, 18, 3624, 803, 2934, 334, 67, 3188, 468, 4344, 640, 15699, 18, 1140, 18, 343, 1711, 12, 2890, 18, 3624, 803, 16, 610, 18, 55, 67, 45, 6949, 13, 1140, 18, 343, 1711, 12, 16961, 19793, 16, 610, 18, 55, 67, 45, 6949, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 265, 67, 1636, 12, 2890, 4672, 365, 18, 1636, 1119, 273, 374, 1140, 18, 26686, 12, 16961, 19793, 13, 365, 18, 3624, 803, 273, 1140, 18, 803, 18, 5701, 12, 16961, 19793, 16, 296, 69, 6134, 284, 273, 1696, 12, 2890, 18, 3624, 803, 16, 296, 91, 6134, 284, 18, 4412, 1435, 1592, 67, 1214, 67, 3188, 273, 1140, 18, 5642, 12, 16961, 19793, 2934, 334, 67, 3188, 1592, 67, 3624, 67, 3188, 273, 1140, 18, 5642, 12, 2890, 18, 3624, 803, 2934, 334, 67, 3188, 468, 4344, 640, 15699, 18, 1140, 18, 343, 1711, 12, 2890, 18, 3624, 803, 16, 610, 18, 55, 67, 45, 6949, 13, 1140, 18, 343, 1711, 12, 16961, 19793, 16, 2 ]
anArgumentTuple = tuple( self.theDirectoryName ) + (sim,) + (data,)
anArgumentTuple = ( self.theDirectoryName, sim , data )
def createInstance( self, sim, data, parent=None ): aConstructor = self.theModule.__dict__[self.theName] anArgumentTuple = tuple( self.theDirectoryName ) + (sim,) + (data,) apply( aConstructor, anArgumentTuple )
4626d974b9ee7a7bc23d48f134bfb72c2f45f016 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12724/4626d974b9ee7a7bc23d48f134bfb72c2f45f016/Plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20075, 12, 365, 16, 3142, 16, 501, 16, 982, 33, 7036, 262, 30, 279, 6293, 273, 365, 18, 5787, 3120, 16186, 1576, 972, 63, 2890, 18, 5787, 461, 65, 392, 1379, 9038, 273, 261, 365, 18, 5787, 2853, 461, 16, 3142, 269, 501, 262, 2230, 12, 279, 6293, 16, 392, 1379, 9038, 262, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20075, 12, 365, 16, 3142, 16, 501, 16, 982, 33, 7036, 262, 30, 279, 6293, 273, 365, 18, 5787, 3120, 16186, 1576, 972, 63, 2890, 18, 5787, 461, 65, 392, 1379, 9038, 273, 261, 365, 18, 5787, 2853, 461, 16, 3142, 269, 501, 262, 2230, 12, 279, 6293, 16, 392, 1379, 9038, 262, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
sys.stdout = self.stdout_backup
sys.stderr= self.stderr_backup
def tearDown(self): sys.stdout = self.stdout_backup
ddf21e206a3be38788eb385d5fcf57bfca3bac20 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6792/ddf21e206a3be38788eb385d5fcf57bfca3bac20/zonemgr_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 2091, 4164, 12, 2890, 4672, 2589, 18, 10283, 273, 365, 18, 10283, 67, 9572, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 2091, 4164, 12, 2890, 4672, 2589, 18, 10283, 273, 365, 18, 10283, 67, 9572, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
print "%s doesn't exist. Creating it"
print "%s doesn't exist. Creating it" % output_dir
def prepare(): for rf in required_files: if not osp.lexists(rf): print " Couldn't found required template: %s " % (rf, ) exit() if osp.lexists(output_dir): if not osp.isdir(output_dir): print "I have found %s and it is not a directory. May me you launch me from incorrect directory" % (output_dir,) exit() try : print "Removind directory and recreating it" subprocess.call(['rm', '-rf' , "./"+output_dir]) #os.rmdir(output_dir) os.mkdir(output_dir) except: print "Can not remove output directory %s. Remove it yourself and relaunch script" % ( output_dir, ) exit() else : print "%s doesn't exist. Creating it" os.mkdir(output_dir)
5cbb4f7ba7b56cf5eddb34a8b2d9aaf3e77cf950 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1701/5cbb4f7ba7b56cf5eddb34a8b2d9aaf3e77cf950/newplugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2911, 13332, 364, 9075, 316, 1931, 67, 2354, 30, 309, 486, 23660, 18, 4149, 1486, 12, 5809, 4672, 1172, 315, 14312, 82, 1404, 1392, 1931, 1542, 30, 738, 87, 315, 738, 261, 5809, 16, 262, 2427, 1435, 225, 309, 23660, 18, 4149, 1486, 12, 2844, 67, 1214, 4672, 309, 225, 486, 23660, 18, 291, 1214, 12, 2844, 67, 1214, 4672, 1172, 315, 45, 1240, 1392, 738, 87, 471, 518, 353, 486, 279, 1867, 18, 16734, 1791, 1846, 8037, 1791, 628, 11332, 1867, 6, 738, 261, 2844, 67, 1214, 16, 13, 2427, 1435, 225, 775, 294, 1172, 315, 4579, 728, 1867, 471, 283, 23799, 518, 6, 6652, 18, 1991, 12, 3292, 8864, 2187, 2400, 5809, 11, 269, 3552, 4898, 15, 2844, 67, 1214, 5717, 468, 538, 18, 8864, 1214, 12, 2844, 67, 1214, 13, 1140, 18, 26686, 12, 2844, 67, 1214, 13, 1335, 30, 1172, 315, 2568, 486, 1206, 876, 1867, 738, 87, 18, 3581, 518, 3433, 2890, 471, 1279, 4760, 2728, 6, 738, 261, 876, 67, 1214, 16, 262, 2427, 1435, 469, 294, 1172, 2213, 87, 3302, 1404, 1005, 18, 21837, 518, 6, 738, 876, 67, 1214, 1140, 18, 26686, 12, 2844, 67, 1214, 13, 1377, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2911, 13332, 364, 9075, 316, 1931, 67, 2354, 30, 309, 486, 23660, 18, 4149, 1486, 12, 5809, 4672, 1172, 315, 14312, 82, 1404, 1392, 1931, 1542, 30, 738, 87, 315, 738, 261, 5809, 16, 262, 2427, 1435, 225, 309, 23660, 18, 4149, 1486, 12, 2844, 67, 1214, 4672, 309, 225, 486, 23660, 18, 291, 1214, 12, 2844, 67, 1214, 4672, 1172, 315, 45, 1240, 1392, 738, 87, 471, 518, 353, 486, 279, 1867, 18, 16734, 1791, 1846, 8037, 1791, 628, 11332, 1867, 6, 738, 261, 2844, 67, 1214, 16, 13, 2427, 1435, 225, 775, 294, 1172, 315, 4579, 728, 1867, 471, 283, 23799, 518, 6, 6652, 18, 1991, 12, 3292, 8864, 2187, 2400, 5809, 11, 269, 3552, 4898, 2 ]
script_review_top.__doc__=_("Moves the review cursor to the top line of the current navigator object")
script_review_top.__doc__=_("Moves the review cursor to the top line of the current navigator object and speaks it")
def script_review_top(self,keyPress): info=globalVars.reviewPosition.obj.makeTextInfo(textHandler.POSITION_FIRST) globalVars.reviewPosition=info.copy() info.expand(textHandler.UNIT_LINE) speech.speakMessage(_("top")) speech.speakFormattedText(info)
e71a52fd4a4b47af55b85211140c5deabbe03c2b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9340/e71a52fd4a4b47af55b85211140c5deabbe03c2b/_default.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2728, 67, 16041, 67, 3669, 12, 2890, 16, 856, 11840, 4672, 1123, 33, 6347, 5555, 18, 16041, 2555, 18, 2603, 18, 6540, 1528, 966, 12, 955, 1503, 18, 15258, 67, 15354, 13, 2552, 5555, 18, 16041, 2555, 33, 1376, 18, 3530, 1435, 1123, 18, 12320, 12, 955, 1503, 18, 15736, 67, 5997, 13, 24556, 18, 87, 10244, 1079, 24899, 2932, 3669, 6, 3719, 24556, 18, 87, 10244, 18298, 1528, 12, 1376, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2728, 67, 16041, 67, 3669, 12, 2890, 16, 856, 11840, 4672, 1123, 33, 6347, 5555, 18, 16041, 2555, 18, 2603, 18, 6540, 1528, 966, 12, 955, 1503, 18, 15258, 67, 15354, 13, 2552, 5555, 18, 16041, 2555, 33, 1376, 18, 3530, 1435, 1123, 18, 12320, 12, 955, 1503, 18, 15736, 67, 5997, 13, 24556, 18, 87, 10244, 1079, 24899, 2932, 3669, 6, 3719, 24556, 18, 87, 10244, 18298, 1528, 12, 1376, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
__slots__ = ("a", "b")
__slots__ = ("_a", "_b")
def __repr__(self): return "(%s / %s)" % (repr(self.a), repr(self.b))
b6bc55326d79b64f2048b486159e78b329f2b9ca /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/624/b6bc55326d79b64f2048b486159e78b329f2b9ca/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 327, 7751, 9, 87, 342, 738, 87, 2225, 738, 261, 12715, 12, 2890, 18, 69, 3631, 8480, 12, 2890, 18, 70, 3719, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 327, 7751, 9, 87, 342, 738, 87, 2225, 738, 261, 12715, 12, 2890, 18, 69, 3631, 8480, 12, 2890, 18, 70, 3719, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
def lead(p): return p.lexLead() reductors=Polynomial(1)
reductors=Polynomial(1).set()
def lead(p): return p.lexLead()
06a9f6ca9741467ec77ffd30a94903bf0ac6a603 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2046/06a9f6ca9741467ec77ffd30a94903bf0ac6a603/ll.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5871, 12, 84, 4672, 327, 293, 18, 4149, 9678, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5871, 12, 84, 4672, 327, 293, 18, 4149, 9678, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
fields_desc = [ ShortEnumField("algo", 0, ["open", "sharedkey"]),
fields_desc = [ LEShortEnumField("algo", 0, ["open", "sharedkey"]),
def mysummary(self): if self.ID == 0: return "SSID=%s"%repr(self.info),[Dot11] else: return ""
9e997e264462646e694ada714420b482033b3cd6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7311/9e997e264462646e694ada714420b482033b3cd6/scapy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3399, 7687, 12, 2890, 4672, 309, 365, 18, 734, 422, 374, 30, 327, 315, 1260, 734, 5095, 87, 28385, 12715, 12, 2890, 18, 1376, 3631, 63, 10412, 2499, 65, 469, 30, 327, 1408, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3399, 7687, 12, 2890, 4672, 309, 365, 18, 734, 422, 374, 30, 327, 315, 1260, 734, 5095, 87, 28385, 12715, 12, 2890, 18, 1376, 3631, 63, 10412, 2499, 65, 469, 30, 327, 1408, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
self.root=root=DummyModel(self.outfileName)
self.root=root=DummyModel(self.outfilename)
def parseAndGenerate(self):
6b7f3cabb82196cafdc67e109e1e8d5fb43665bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11941/6b7f3cabb82196cafdc67e109e1e8d5fb43665bf/ArchetypesGenerator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 1876, 4625, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 1876, 4625, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
self.send_document(path, html.escape( 'Problem in %s - %s' % (value.filename, value.args)))
self.send_document(path, html.escape(str(value)))
def do_GET(self): path = self.path if path[-5:] == '.html': path = path[:-5] if path[:1] == '/': path = path[1:] if path and path != '.': try: p, x = locate(path) except DocImportError, value: self.send_document(path, html.escape( 'Problem in %s - %s' % (value.filename, value.args))) return if x: self.send_document(describe(x), html.document(x)) else: self.send_document(path,
a8b37d1a3238fb85be760a30db03672525e8f591 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/a8b37d1a3238fb85be760a30db03672525e8f591/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 3264, 12, 2890, 4672, 589, 273, 365, 18, 803, 309, 589, 18919, 25, 26894, 422, 2418, 2620, 4278, 589, 273, 589, 10531, 17, 25, 65, 309, 589, 10531, 21, 65, 422, 2023, 30, 589, 273, 589, 63, 21, 26894, 309, 589, 471, 589, 480, 2611, 30, 775, 30, 293, 16, 619, 273, 10627, 12, 803, 13, 1335, 3521, 5010, 668, 16, 460, 30, 365, 18, 4661, 67, 5457, 12, 803, 16, 1729, 18, 6939, 12, 701, 12, 1132, 20349, 327, 309, 619, 30, 365, 18, 4661, 67, 5457, 12, 22748, 12, 92, 3631, 1729, 18, 5457, 12, 92, 3719, 469, 30, 365, 18, 4661, 67, 5457, 12, 803, 16, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 3264, 12, 2890, 4672, 589, 273, 365, 18, 803, 309, 589, 18919, 25, 26894, 422, 2418, 2620, 4278, 589, 273, 589, 10531, 17, 25, 65, 309, 589, 10531, 21, 65, 422, 2023, 30, 589, 273, 589, 63, 21, 26894, 309, 589, 471, 589, 480, 2611, 30, 775, 30, 293, 16, 619, 273, 10627, 12, 803, 13, 1335, 3521, 5010, 668, 16, 460, 30, 365, 18, 4661, 67, 5457, 12, 803, 16, 1729, 18, 6939, 12, 701, 12, 1132, 20349, 327, 309, 619, 30, 365, 18, 4661, 67, 5457, 12, 22748, 12, 92, 3631, 1729, 18, 5457, 12, 92, 3719, 469, 30, 365, 18, 4661, 67, 5457, 12, 803, 16, 2, -100, -100, -100, -100, -100, -100, -100 ]
self.__init_from_reg_key__( key, name )
self.__init_from_reg_key__(key, name)
def __init__( self, key, name = None ): if( not name and len( key ) == struct.calcsize( self.format ) ): self.__init_from_bytes__( key ) else: self.__init_from_reg_key__( key, name )
59648a863c896e2f14363d0c28a25b3865360d9a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/992/59648a863c896e2f14363d0c28a25b3865360d9a/win32timezone.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 16, 498, 16, 508, 273, 599, 262, 30, 309, 12, 486, 508, 471, 562, 12, 498, 262, 422, 1958, 18, 12448, 1467, 12, 365, 18, 2139, 262, 262, 30, 365, 16186, 2738, 67, 2080, 67, 3890, 972, 12, 498, 262, 469, 30, 365, 16186, 2738, 67, 2080, 67, 1574, 67, 856, 972, 12, 856, 16, 508, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 16, 498, 16, 508, 273, 599, 262, 30, 309, 12, 486, 508, 471, 562, 12, 498, 262, 422, 1958, 18, 12448, 1467, 12, 365, 18, 2139, 262, 262, 30, 365, 16186, 2738, 67, 2080, 67, 3890, 972, 12, 498, 262, 469, 30, 365, 16186, 2738, 67, 2080, 67, 1574, 67, 856, 972, 12, 856, 16, 508, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
self.timeshift = pyshift.pyshift_init(config.TIMESHIFT_BUFFER,config.TIMESHIFT_BUFFER_SIZE * 1024*1024) pyshift.pyshift_write(self.timeshift,self.tsinput.read(1024*1024* TIMESHIFT_READAHEAD))
self.timeshift = pyshift.pyshift_init(config.TIMESHIFT_BUFFER, config.TIMESHIFT_BUFFER_SIZE * 1024*1024) pyshift.pyshift_write(self.timeshift, self.tsinput.read(1024*1024* TIMESHIFT_READAHEAD))
def run(self): while 1: if self.mode == 'idle': self.mode_flag.wait() self.mode_flag.clear() elif self.mode == 'play': # The DXR3 device cannot be shared between our SDL session # and MPlayer. if (osd.sdl_driver == 'dxr3'): if DEBUG: print "Stopping Display for Video Playback on DXR3" osd.stopdisplay() if DEBUG: print 'MPlayer_Thread.run(): Started, cmd=%s' % self.command self.tsinput = os.popen(config.TIMESHIFT_ENCODE_CMD,'r') self.timeshift = pyshift.pyshift_init(config.TIMESHIFT_BUFFER,config.TIMESHIFT_BUFFER_SIZE * 1024*1024) pyshift.pyshift_write(self.timeshift,self.tsinput.read(1024*1024* TIMESHIFT_READAHEAD)) self.app = MPlayerApp(self.command) while self.mode == 'play' and self.app.isAlive(): pyshift.pyshift_write(self.timeshift,self.tsinput.read(TIMESHIFT_CHUNKSIZE)) # ??? if self.audioinfo: if not self.audioinfo.pause: self.audioinfo.draw() #time.sleep(0.1)
e498694c7f9818552297d29fd2eefb96419cc196 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/e498694c7f9818552297d29fd2eefb96419cc196/timeshift.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 1323, 404, 30, 309, 365, 18, 3188, 422, 296, 20390, 4278, 365, 18, 3188, 67, 6420, 18, 7048, 1435, 365, 18, 3188, 67, 6420, 18, 8507, 1435, 225, 1327, 365, 18, 3188, 422, 296, 1601, 4278, 468, 1021, 26634, 54, 23, 2346, 2780, 506, 5116, 3086, 3134, 17157, 1339, 468, 471, 490, 12148, 18, 309, 261, 538, 72, 18, 87, 5761, 67, 7407, 422, 296, 13437, 86, 23, 11, 4672, 309, 6369, 30, 1172, 315, 21994, 9311, 364, 14030, 19592, 823, 603, 26634, 54, 23, 6, 1140, 72, 18, 5681, 5417, 1435, 309, 6369, 30, 1172, 296, 49, 12148, 67, 3830, 18, 2681, 13332, 29386, 16, 1797, 5095, 87, 11, 738, 365, 18, 3076, 225, 365, 18, 3428, 2630, 273, 1140, 18, 84, 3190, 12, 1425, 18, 4684, 23191, 67, 1157, 5572, 67, 19473, 11189, 86, 6134, 365, 18, 8293, 76, 2136, 273, 2395, 4012, 18, 2074, 4012, 67, 2738, 12, 1425, 18, 4684, 23191, 67, 11302, 16, 642, 18, 4684, 23191, 67, 11302, 67, 4574, 380, 6250, 14, 2163, 3247, 13, 2395, 4012, 18, 2074, 4012, 67, 2626, 12, 2890, 18, 8293, 76, 2136, 16, 365, 18, 3428, 2630, 18, 896, 12, 2163, 3247, 14, 2163, 3247, 14, 8721, 23191, 67, 6949, 37, 12458, 3719, 365, 18, 2910, 273, 490, 12148, 3371, 12, 2890, 18, 3076, 13, 225, 1323, 365, 18, 3188, 422, 296, 1601, 11, 471, 365, 18, 2910, 18, 291, 10608, 13332, 2395, 4012, 18, 2074, 4012, 67, 2626, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 1323, 404, 30, 309, 365, 18, 3188, 422, 296, 20390, 4278, 365, 18, 3188, 67, 6420, 18, 7048, 1435, 365, 18, 3188, 67, 6420, 18, 8507, 1435, 225, 1327, 365, 18, 3188, 422, 296, 1601, 4278, 468, 1021, 26634, 54, 23, 2346, 2780, 506, 5116, 3086, 3134, 17157, 1339, 468, 471, 490, 12148, 18, 309, 261, 538, 72, 18, 87, 5761, 67, 7407, 422, 296, 13437, 86, 23, 11, 4672, 309, 6369, 30, 1172, 315, 21994, 9311, 364, 14030, 19592, 823, 603, 26634, 54, 23, 6, 1140, 72, 18, 5681, 5417, 1435, 309, 6369, 30, 1172, 296, 49, 12148, 67, 3830, 18, 2681, 13332, 29386, 16, 1797, 5095, 87, 11, 738, 365, 18, 3076, 2 ]
q = qimage2ndarray.array2qimage(yxImage)
q = qimage2ndarray.array2qimage(yxImage, normalize)
def qimage(self, normalize = True): """ Convert this image to a Qt QImage (mainly for display purposes). The present image must have 1, 2, 3, or 4 channels, and the resulting QImage will have QImage.Format_Indexed8 iff there was only one channel and QImage.Format_[A]RGB32 otherwise (with the last of 2/4 channels being used as alpha channel). The parameter `normalize` can be used to normalize an image's value range to 0..255:
acf671d5bc775f705e10192b67cc164b7cf03e3e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12582/acf671d5bc775f705e10192b67cc164b7cf03e3e/arraytypes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1043, 2730, 12, 2890, 16, 3883, 273, 1053, 4672, 3536, 4037, 333, 1316, 358, 279, 7354, 2238, 2040, 261, 5254, 715, 364, 2562, 13694, 2934, 1021, 3430, 1316, 1297, 1240, 404, 16, 576, 16, 890, 16, 578, 1059, 5750, 16, 471, 326, 8156, 2238, 2040, 903, 1240, 2238, 2040, 18, 1630, 67, 15034, 28, 21437, 1915, 1703, 1338, 1245, 1904, 471, 2238, 2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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1043, 2730, 12, 2890, 16, 3883, 273, 1053, 4672, 3536, 4037, 333, 1316, 358, 279, 7354, 2238, 2040, 261, 5254, 715, 364, 2562, 13694, 2934, 1021, 3430, 1316, 1297, 1240, 404, 16, 576, 16, 890, 16, 578, 1059, 5750, 16, 471, 326, 8156, 2238, 2040, 903, 1240, 2238, 2040, 18, 1630, 67, 15034, 28, 21437, 1915, 1703, 1338, 1245, 1904, 471, 2238, 2040, 18, 1630, 67, 63, 37, 65, 11343, 1578, 3541, 261, 1918, 326, 1142, 434, 576, 19, 24, 5750, 3832, 1399, 487, 4190, 1904, 2934, 225, 1021, 1569, 1375, 12237, 68, 848, 506, 1399, 358, 3883, 392, 1316, 1807, 460, 1048, 358, 374, 838, 10395, 30, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
5: I INT 1
5: L LONG 1
def __init__(self, value): self.value = value
6d262a40cfc4ca756204ddc89b33a303dfa3d216 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/6d262a40cfc4ca756204ddc89b33a303dfa3d216/pickletools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 460, 4672, 365, 18, 1132, 273, 460, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 460, 4672, 365, 18, 1132, 273, 460, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
eventlisttmp = [time.strftime('%Y%m%d'), time.strftime('%H%M'), self.GetProcessName(event), str(event.Window), os.getenv('USERNAME'), str(event.WindowName).replace(self.settings['General']['Log File Field Separator'], '[sep_key]')]
eventlisttmp = [time.strftime('%Y%m%d'), time.strftime('%H%M'), self.GetProcessName(event).replace(self.settings['General']['Log File Field Separator'], '[sep_key]'), str(event.Window), unicode(os.getenv('USERNAME'), 'latin-1').replace(self.settings['General']['Log File Field Separator'], '[sep_key]'), unicode(event.WindowName, 'latin-1').replace(self.settings['General']['Log File Field Separator'], '[sep_key]')]
def run(self): '''This is the main workhorse function. Keeps popping events off the queue, and processing them, until program quits ''' ## line format: ## date; time (1 minute resolution); fullapppath; hwnd; username; window title; eventdata ## ## if we are logging keystroke count, that field becomes the penultimate field. ## ## event data: ascii if normal key, escaped if "special" key, escaped if csv separator ## self.processName = self.GetProcessName(event.Window) #fullapppath ## hwnd = event.Window ## username = os.environ['USERNAME'] ## date = time.strftime('%Y%m%d') ## time = time.strftime('%H%m') #is this correct? or format event.time probably... ## windowtitle = str(event.WindowName) # Logic: put the line into a list, check if all contents (except for eventdata) are equal, if so, just append eventdata to existing eventdata. otherwise, write out the previous event list, and start a new one. ## on flush or on exit, make sure to write the latest dataline self.eventlist = range(7) #initialize our eventlist to something. if self.settings['General']['Log Key Count'] == True: self.eventlist.append(7) while not self.finished.isSet(): try: event = self.q.get(timeout=0.5) #need the timeout so that thread terminates properly when exiting loggable = self.TestForNoLog(event) # see if the program is in the no-log list. if not loggable: if self.cmdoptions.debug: self.PrintDebug("not loggable, we are outta here\n") continue if self.cmdoptions.debug: self.PrintDebug("loggable, lets log it. key: " + self.ParseEventValue(event)) loggable = self.OpenLogFile() #will return true if log file has been opened without problems if not loggable: self.PrintDebug("some error occurred when opening the log file. we cannot log this event. check systemlog (if specified) for details.\n") continue eventlisttmp = [time.strftime('%Y%m%d'), time.strftime('%H%M'), self.GetProcessName(event), str(event.Window), os.getenv('USERNAME'), str(event.WindowName).replace(self.settings['General']['Log File Field Separator'], '[sep_key]')] if self.settings['General']['Log Key Count'] == True: eventlisttmp = eventlisttmp + ['1',unicode(self.ParseEventValue(event), 'latin-1')] else: eventlisttmp.append(unicode(self.ParseEventValue(event), 'latin-1')) if (self.eventlist[:6] == eventlisttmp[:6]) and (self.settings['General']['Limit Keylog Field Size'] == 0 or (len(self.eventlist[-1]) + len(eventlisttmp[-1])) < self.settings['General']['Limit Keylog Field Size']): self.eventlist[-1] = str(self.eventlist[-1]) + str(eventlisttmp[-1]) #append char to log if self.settings['General']['Log Key Count'] == True: self.eventlist[-2] = str(int(self.eventlist[-2]) + 1) # increase stroke count else: self.WriteToLogFile() #write the eventlist to file, unless it's just the dummy list self.eventlist = eventlisttmp except Queue.Empty: pass #let's keep iterating except: self.PrintDebug("some exception was caught in the logwriter loop...\nhere it is:\n", sys.exc_info()) pass #let's keep iterating self.finished.set() #shouldn't ever need this, but just in case...
9fc00e0f77899b22f4d3227d98afdc7fbcb0f077 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3638/9fc00e0f77899b22f4d3227d98afdc7fbcb0f077/logwriter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 9163, 2503, 353, 326, 2774, 1440, 76, 23035, 445, 18, 10498, 87, 1843, 1382, 2641, 3397, 326, 2389, 16, 471, 4929, 2182, 16, 3180, 5402, 719, 1282, 9163, 7541, 980, 740, 30, 7541, 1509, 31, 813, 261, 21, 8044, 7861, 1769, 1983, 2910, 803, 31, 16139, 4880, 31, 2718, 31, 2742, 2077, 31, 29446, 7541, 7541, 309, 732, 854, 2907, 498, 16181, 1056, 16, 716, 652, 12724, 326, 14264, 406, 4988, 652, 18, 7541, 7541, 871, 501, 30, 11384, 309, 2212, 498, 16, 8345, 309, 315, 9371, 6, 498, 16, 8345, 309, 6101, 4182, 7541, 365, 18, 2567, 461, 273, 365, 18, 967, 2227, 461, 12, 2575, 18, 3829, 13, 468, 2854, 2910, 803, 7541, 16139, 4880, 273, 871, 18, 3829, 7541, 2718, 273, 1140, 18, 28684, 3292, 21292, 3546, 7541, 1509, 273, 813, 18, 701, 9982, 29909, 61, 9, 81, 9, 72, 6134, 7541, 813, 273, 813, 18, 701, 9982, 29909, 44, 9, 81, 6134, 468, 291, 333, 3434, 35, 578, 740, 871, 18, 957, 8656, 2777, 7541, 2742, 2649, 273, 609, 12, 2575, 18, 3829, 461, 13, 225, 468, 10287, 30, 1378, 326, 980, 1368, 279, 666, 16, 866, 309, 777, 2939, 261, 14137, 364, 29446, 13, 854, 3959, 16, 309, 1427, 16, 2537, 714, 29446, 358, 2062, 29446, 18, 3541, 16, 1045, 596, 326, 2416, 871, 666, 16, 471, 787, 279, 394, 1245, 18, 7541, 603, 3663, 578, 603, 2427, 16, 1221, 3071, 358, 1045, 326, 4891, 18462, 558, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 9163, 2503, 353, 326, 2774, 1440, 76, 23035, 445, 18, 10498, 87, 1843, 1382, 2641, 3397, 326, 2389, 16, 471, 4929, 2182, 16, 3180, 5402, 719, 1282, 9163, 7541, 980, 740, 30, 7541, 1509, 31, 813, 261, 21, 8044, 7861, 1769, 1983, 2910, 803, 31, 16139, 4880, 31, 2718, 31, 2742, 2077, 31, 29446, 7541, 7541, 309, 732, 854, 2907, 498, 16181, 1056, 16, 716, 652, 12724, 326, 14264, 406, 4988, 652, 18, 7541, 7541, 871, 501, 30, 11384, 309, 2212, 498, 16, 8345, 309, 315, 9371, 6, 498, 16, 8345, 309, 6101, 4182, 7541, 365, 18, 2567, 461, 273, 365, 18, 967, 2227, 461, 12, 2575, 18, 3829, 13, 468, 2854, 2910, 803, 2 ]
root.append(blockette.getXML(xseed_version=version))
sub.append(blockette.getXML(xseed_version=version)) if version == '1.0': SubElement(doc, utils.toTag('Timespan Control Header')) SubElement(doc, utils.toTag('Data Records'))
def getXSEED(self, version=DEFAULT_XSEED_VERSION, split_stations=False): """ Returns a XML representation of all headers of a SEED volume.
92ca6c6a5f622775d2315fbc075a01a83fec844b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10470/92ca6c6a5f622775d2315fbc075a01a83fec844b/parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6538, 1090, 2056, 12, 2890, 16, 1177, 33, 5280, 67, 60, 1090, 2056, 67, 5757, 16, 1416, 67, 31478, 33, 8381, 4672, 3536, 2860, 279, 3167, 4335, 434, 777, 1607, 434, 279, 3174, 2056, 3940, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6538, 1090, 2056, 12, 2890, 16, 1177, 33, 5280, 67, 60, 1090, 2056, 67, 5757, 16, 1416, 67, 31478, 33, 8381, 4672, 3536, 2860, 279, 3167, 4335, 434, 777, 1607, 434, 279, 3174, 2056, 3940, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
if self.source:
if self.source is not None:
def _ensureQueryIsCurrent (self): """ Make sure that we update the queryString if the rule is stale, then let our superclass handle its part. """ if self.ruleIsStale: args = {} newQueryString = self._rule if self.source: if newQueryString: newQueryString = "union (" + newQueryString + ", for i in $0 where True)" else: newQueryString = "for i in $0 where True" args ["$0"] = (self.source.itsUUID, "_resultSet") if len (self.inclusions): if newQueryString: newQueryString = "union (" + newQueryString + ", for i in $1 where True)" else: newQueryString = "for i in $1 where True" args ["$1"] = (self.itsUUID, "inclusions") if newQueryString: if len (self.exclusions): newQueryString = "difference (" + newQueryString + ", for i in $2 where True)" args ["$2"] = (self.itsUUID, "exclusions") if len (self.kindFilter) != 0: for kindPath in self.kindFilter: newQueryString = "intersect (" + newQueryString + ", for i inevery '" + kindPath + "' where True)" self.queryString = newQueryString self.args = args self.ruleIsStale = False return super (ItemCollection, self)._ensureQueryIsCurrent ()
f019b4b7fa0d34a07523d3b8cef10dcf46bb98c4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/f019b4b7fa0d34a07523d3b8cef10dcf46bb98c4/ItemCollection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 15735, 1138, 2520, 3935, 261, 2890, 4672, 3536, 4344, 3071, 716, 732, 1089, 326, 11337, 309, 326, 1720, 353, 14067, 16, 1508, 2231, 3134, 12098, 1640, 2097, 1087, 18, 3536, 309, 365, 18, 5345, 2520, 19155, 30, 833, 273, 2618, 394, 15276, 273, 365, 6315, 5345, 309, 365, 18, 3168, 353, 486, 599, 30, 309, 394, 15276, 30, 394, 15276, 273, 315, 18910, 7566, 397, 394, 15276, 397, 3104, 364, 277, 316, 271, 20, 1625, 1053, 2225, 469, 30, 394, 15276, 273, 315, 1884, 277, 316, 271, 20, 1625, 1053, 6, 833, 8247, 8, 20, 11929, 273, 261, 2890, 18, 3168, 18, 1282, 5562, 16, 4192, 2088, 694, 7923, 309, 562, 261, 2890, 18, 267, 25364, 4672, 309, 394, 15276, 30, 394, 15276, 273, 315, 18910, 7566, 397, 394, 15276, 397, 3104, 364, 277, 316, 271, 21, 1625, 1053, 2225, 469, 30, 394, 15276, 273, 315, 1884, 277, 316, 271, 21, 1625, 1053, 6, 833, 8247, 8, 21, 11929, 273, 261, 2890, 18, 1282, 5562, 16, 315, 267, 25364, 7923, 309, 394, 15276, 30, 309, 562, 261, 2890, 18, 338, 25364, 4672, 394, 15276, 273, 315, 23444, 7566, 397, 394, 15276, 397, 3104, 364, 277, 316, 271, 22, 1625, 1053, 2225, 833, 8247, 8, 22, 11929, 273, 261, 2890, 18, 1282, 5562, 16, 315, 338, 25364, 7923, 309, 562, 261, 2890, 18, 9224, 1586, 13, 480, 374, 30, 364, 3846, 743, 316, 365, 18, 9224, 1586, 30, 394, 15276, 273, 315, 12288, 7566, 397, 394, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 15735, 1138, 2520, 3935, 261, 2890, 4672, 3536, 4344, 3071, 716, 732, 1089, 326, 11337, 309, 326, 1720, 353, 14067, 16, 1508, 2231, 3134, 12098, 1640, 2097, 1087, 18, 3536, 309, 365, 18, 5345, 2520, 19155, 30, 833, 273, 2618, 394, 15276, 273, 365, 6315, 5345, 309, 365, 18, 3168, 353, 486, 599, 30, 309, 394, 15276, 30, 394, 15276, 273, 315, 18910, 7566, 397, 394, 15276, 397, 3104, 364, 277, 316, 271, 20, 1625, 1053, 2225, 469, 30, 394, 15276, 273, 315, 1884, 277, 316, 271, 20, 1625, 1053, 6, 833, 8247, 8, 20, 11929, 273, 261, 2890, 18, 3168, 18, 1282, 5562, 16, 4192, 2088, 694, 7923, 309, 562, 261, 2890, 18, 267, 25364, 4672, 2 ]
if m1 != m2 and move: status += " and moved one chunk" m1.rot(Q(a1.posn()-s1.posn(), s2.posn()-a2.posn())) m1.move(s2.posn()-s1.posn())
if m1 != m2 and move: def ok_to_move(mol1, mol2): "ok to move mol1 if we're about to bond it to mol2?" return mol1.externs == [] if ok_to_move(m1,m2): status += ", and moved %r to match" % m1.name m1.rot(Q(a1.posn()-s1.posn(), s2.posn()-a2.posn())) m1.move(s2.posn()-s1.posn()) else: status += " (but didn't move %r -- it already has a bond)" % m1.name
def do_error(status, error_details): if print_error_details and error_details: print "BUG: bond_at_singlets:", error_details print "Doing nothing (but further bugs may be caused by this)." print_compact_stack() if error_details: # i.e. if it's an error flag = 2 else: flag = 1 status = status or "can't bond here" return (flag, status)
9b1b330abac535663d750943858465a92f111d1f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/9b1b330abac535663d750943858465a92f111d1f/chunk.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 1636, 12, 2327, 16, 555, 67, 6395, 4672, 309, 1172, 67, 1636, 67, 6395, 471, 555, 67, 6395, 30, 1172, 315, 4827, 30, 8427, 67, 270, 67, 2470, 17307, 2773, 16, 555, 67, 6395, 1172, 315, 3244, 310, 5083, 261, 12885, 9271, 22398, 2026, 506, 15848, 635, 333, 14944, 1172, 67, 21038, 67, 3772, 1435, 309, 555, 67, 6395, 30, 468, 277, 18, 73, 18, 309, 518, 1807, 392, 555, 2982, 273, 576, 469, 30, 2982, 273, 404, 1267, 273, 1267, 578, 315, 4169, 1404, 8427, 2674, 6, 327, 261, 6420, 16, 1267, 13, 2, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 1636, 12, 2327, 16, 555, 67, 6395, 4672, 309, 1172, 67, 1636, 67, 6395, 471, 555, 67, 6395, 30, 1172, 315, 4827, 30, 8427, 67, 270, 67, 2470, 17307, 2773, 16, 555, 67, 6395, 1172, 315, 3244, 310, 5083, 261, 12885, 9271, 22398, 2026, 506, 15848, 635, 333, 14944, 1172, 67, 21038, 67, 3772, 1435, 309, 555, 67, 6395, 30, 468, 277, 18, 73, 18, 309, 518, 1807, 392, 555, 2982, 273, 576, 469, 30, 2982, 273, 404, 1267, 273, 1267, 578, 315, 4169, 1404, 8427, 2674, 6, 327, 261, 6420, 16, 1267, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
raise unittest.SkipTest("Locale support on MacOSX is minimal")
import os tlocs = ("en_US.UTF-8", "en_US.ISO8859-1", "en_US") if int(os.uname()[2].split('.')[0]) < 10: raise unittest.SkipTest("Locale support on MacOSX is minimal")
def get_enUS_locale(): global enUS_locale if sys.platform == 'darwin': raise unittest.SkipTest("Locale support on MacOSX is minimal") if sys.platform.startswith("win"): tlocs = ("En", "English") else: tlocs = ("en_US.UTF-8", "en_US.US-ASCII", "en_US") oldlocale = locale.setlocale(locale.LC_NUMERIC) for tloc in tlocs: try: locale.setlocale(locale.LC_NUMERIC, tloc) except locale.Error: continue break else: raise unittest.SkipTest( "Test locale not supported (tried %s)" % (', '.join(tlocs))) enUS_locale = tloc locale.setlocale(locale.LC_NUMERIC, oldlocale)
69916116420ab7128dc169af8552c3f9251fa4ea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/69916116420ab7128dc169af8552c3f9251fa4ea/test_locale.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 275, 3378, 67, 6339, 13332, 2552, 570, 3378, 67, 6339, 309, 2589, 18, 9898, 422, 296, 28076, 4278, 1930, 1140, 268, 24323, 273, 7566, 275, 67, 3378, 18, 5159, 17, 28, 3113, 315, 275, 67, 3378, 18, 12609, 17258, 17, 21, 3113, 315, 275, 67, 3378, 7923, 309, 509, 12, 538, 18, 318, 339, 1435, 63, 22, 8009, 4939, 2668, 1093, 25146, 20, 5717, 411, 1728, 30, 565, 1002, 2836, 3813, 18, 6368, 4709, 2932, 3916, 2865, 603, 13217, 4618, 60, 353, 16745, 7923, 309, 2589, 18, 9898, 18, 17514, 1918, 2932, 8082, 6, 4672, 268, 24323, 273, 7566, 664, 3113, 315, 664, 13740, 7923, 469, 30, 268, 24323, 273, 7566, 275, 67, 3378, 18, 5159, 17, 28, 3113, 315, 275, 67, 3378, 18, 3378, 17, 13756, 3113, 315, 275, 67, 3378, 7923, 1592, 6339, 273, 2573, 18, 542, 6339, 12, 6339, 18, 13394, 67, 22998, 13, 364, 268, 1829, 316, 268, 24323, 30, 775, 30, 2573, 18, 542, 6339, 12, 6339, 18, 13394, 67, 22998, 16, 268, 1829, 13, 1335, 2573, 18, 668, 30, 1324, 898, 469, 30, 1002, 2836, 3813, 18, 6368, 4709, 12, 315, 4709, 2573, 486, 3260, 261, 313, 2092, 738, 87, 2225, 738, 261, 2187, 2418, 5701, 12, 88, 24323, 20349, 570, 3378, 67, 6339, 273, 268, 1829, 2573, 18, 542, 6339, 12, 6339, 18, 13394, 67, 22998, 16, 1592, 6339, 13, 282, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 275, 3378, 67, 6339, 13332, 2552, 570, 3378, 67, 6339, 309, 2589, 18, 9898, 422, 296, 28076, 4278, 1930, 1140, 268, 24323, 273, 7566, 275, 67, 3378, 18, 5159, 17, 28, 3113, 315, 275, 67, 3378, 18, 12609, 17258, 17, 21, 3113, 315, 275, 67, 3378, 7923, 309, 509, 12, 538, 18, 318, 339, 1435, 63, 22, 8009, 4939, 2668, 1093, 25146, 20, 5717, 411, 1728, 30, 565, 1002, 2836, 3813, 18, 6368, 4709, 2932, 3916, 2865, 603, 13217, 4618, 60, 353, 16745, 7923, 309, 2589, 18, 9898, 18, 17514, 1918, 2932, 8082, 6, 4672, 268, 24323, 273, 7566, 664, 3113, 315, 664, 13740, 7923, 469, 30, 268, 24323, 273, 7566, 275, 67, 3378, 18, 5159, 2 ]
self = plugin_manager.instance_get(cls)
if not cls.multi_instance: self = plugin_manager.instance_get(cls)
def __new__(cls, *args, **kwargs): """ Returns a class instance, If it already instantiated, return it otherwise return new instance """ if issubclass(cls, PluginManager): # If we also a PluginManager, just create and return self = super(Plugin, cls).__new__(cls) self.plugin_manager = self return self
2f8d7eaa285b0b759dcf572fd64a433c279d4cbc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3600/2f8d7eaa285b0b759dcf572fd64a433c279d4cbc/com.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2704, 972, 12, 6429, 16, 380, 1968, 16, 2826, 4333, 4672, 3536, 2860, 279, 667, 791, 16, 971, 518, 1818, 17651, 16, 327, 518, 3541, 327, 394, 791, 3536, 309, 14664, 12, 6429, 16, 6258, 1318, 4672, 468, 971, 732, 2546, 279, 6258, 1318, 16, 2537, 752, 471, 327, 365, 273, 2240, 12, 3773, 16, 2028, 2934, 972, 2704, 972, 12, 6429, 13, 365, 18, 4094, 67, 4181, 273, 365, 327, 365, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 2826, 4333, 4672, 3536, 2860, 279, 667, 791, 16, 971, 518, 1818, 17651, 16, 327, 518, 3541, 327, 394, 791, 3536, 309, 14664, 12, 6429, 16, 6258, 1318, 4672, 468, 971, 732, 2546, 279, 6258, 1318, 16, 2537, 752, 471, 327, 365, 273, 2240, 12, 3773, 16, 2028, 2934, 972, 2704, 972, 12, 6429, 13, 365, 18, 4094, 67, 4181, 273, 365, 327, 365, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
sources = ['cobyla.pyf','cobyla2.f']
sources = ['cobyla.pyf','cobyla2.f','trstlp.f']
def configuration(parent_package='',parent_path=None): package = 'optimize' config = default_config_dict(package, parent_package) local_path = get_path(__name__,parent_path) minpack = ('minpack',{'sources': glob(os.path.join(local_path,'minpack','*.f'))}) sources = ['_minpackmodule.c'] sources = [os.path.join(local_path,x) for x in sources] ext = Extension(dot_join(parent_package, package, '_minpack'), sources, libraries = [minpack]) config['ext_modules'].append(ext) rootfind = glob(os.path.join(local_path,'Zeros','*.c')) roothead = os.path.join(local_path,'zeros.h') config['libraries'].append(('rootfind',{'sources':rootfind, 'headers':roothead})) sources = ['zeros.c'] sources = [os.path.join(local_path,x) for x in sources] ext = Extension(dot_join(parent_package, package, '_zeros'), sources, libraries=['rootfind']) config['ext_modules'].append(ext) lapack = system_info.lapack_opt_info().get_info() sources = ['lbfgsb.pyf','routines.f'] sources = [os.path.join(local_path,'lbfgsb-0.9',x) for x in sources] ext = Extension(dot_join(parent_package, package, "_lbfgsb"), sources=sources, **lapack) config['ext_modules'].append(ext) sources = ['moduleTNC.c', 'tnc.c'] sources = [os.path.join(local_path,'tnc',x) for x in sources] ext = Extension(dot_join(parent_package, package, 'moduleTNC'), sources=sources) config['ext_modules'].append(ext) sources = ['cobyla.pyf','cobyla2.f'] sources = [os.path.join(local_path,'cobyla',x) for x in sources] ext = Extension(dot_join(parent_package, package, '_cobyla'), sources=sources) config['ext_modules'].append(ext) sources = ['minpack2.pyf', 'dcsrch.f', 'dcstep.f'] sources = [os.path.join(local_path,'minpack2',x) for x in sources] ext = Extension(dot_join(parent_package, package, 'minpack2'), sources=sources) config['ext_modules'].append(ext) return config
18a46f16217dd63b1e83e0fb5f152d7fa3839db0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/18a46f16217dd63b1e83e0fb5f152d7fa3839db0/setup_optimize.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1664, 12, 2938, 67, 5610, 2218, 2187, 2938, 67, 803, 33, 7036, 4672, 2181, 273, 296, 29155, 11, 642, 273, 805, 67, 1425, 67, 1576, 12, 5610, 16, 982, 67, 5610, 13, 1191, 67, 803, 273, 336, 67, 803, 12, 972, 529, 972, 16, 2938, 67, 803, 13, 225, 1131, 2920, 273, 7707, 1154, 2920, 2187, 27828, 10141, 4278, 4715, 12, 538, 18, 803, 18, 5701, 12, 3729, 67, 803, 11189, 1154, 2920, 17023, 11146, 74, 26112, 6792, 225, 5550, 273, 10228, 67, 1154, 2920, 2978, 18, 71, 3546, 5550, 273, 306, 538, 18, 803, 18, 5701, 12, 3729, 67, 803, 16, 92, 13, 364, 619, 316, 5550, 65, 1110, 273, 10021, 12, 9811, 67, 5701, 12, 2938, 67, 5610, 16, 2181, 16, 2070, 1154, 2920, 19899, 5550, 16, 14732, 273, 306, 1154, 2920, 5717, 642, 3292, 408, 67, 6400, 29489, 6923, 12, 408, 13, 225, 1365, 4720, 273, 4715, 12, 538, 18, 803, 18, 5701, 12, 3729, 67, 803, 11189, 20801, 17023, 11146, 71, 26112, 1365, 1978, 273, 1140, 18, 803, 18, 5701, 12, 3729, 67, 803, 11189, 22008, 18, 76, 6134, 642, 3292, 31417, 29489, 6923, 12, 2668, 3085, 4720, 2187, 27828, 10141, 4278, 3085, 4720, 16, 296, 2485, 4278, 3085, 1978, 31700, 5550, 273, 10228, 22008, 18, 71, 3546, 5550, 273, 306, 538, 18, 803, 18, 5701, 12, 3729, 67, 803, 16, 92, 13, 364, 619, 316, 5550, 65, 1110, 273, 10021, 12, 9811, 67, 5701, 12, 2938, 67, 5610, 16, 2181, 16, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1664, 12, 2938, 67, 5610, 2218, 2187, 2938, 67, 803, 33, 7036, 4672, 2181, 273, 296, 29155, 11, 642, 273, 805, 67, 1425, 67, 1576, 12, 5610, 16, 982, 67, 5610, 13, 1191, 67, 803, 273, 336, 67, 803, 12, 972, 529, 972, 16, 2938, 67, 803, 13, 225, 1131, 2920, 273, 7707, 1154, 2920, 2187, 27828, 10141, 4278, 4715, 12, 538, 18, 803, 18, 5701, 12, 3729, 67, 803, 11189, 1154, 2920, 17023, 11146, 74, 26112, 6792, 225, 5550, 273, 10228, 67, 1154, 2920, 2978, 18, 71, 3546, 5550, 273, 306, 538, 18, 803, 18, 5701, 12, 3729, 67, 803, 16, 92, 13, 364, 619, 316, 5550, 65, 1110, 273, 10021, 12, 9811, 67, 5701, 12, 2938, 2 ]
token.value = int(input[token.start:self.cursor])
token.value = eval(input[token.start:self.cursor])
def lexZeroNumber(self, ch): token = self.token input = self.source token.type = "number"
ffa49fea078c22673063a368e43ed9c4132a563b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/ffa49fea078c22673063a368e43ed9c4132a563b/Tokenizer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5275, 7170, 1854, 12, 2890, 16, 462, 4672, 1147, 273, 365, 18, 2316, 810, 273, 365, 18, 3168, 1147, 18, 723, 273, 315, 2696, 6, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5275, 7170, 1854, 12, 2890, 16, 462, 4672, 1147, 273, 365, 18, 2316, 810, 273, 365, 18, 3168, 1147, 18, 723, 273, 315, 2696, 6, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
msg = 'Section "%s" created successfully. Now you can <a href="%s">add a menu item now</a> or configure section options below.' % (obj.name, reverse('dashboard_add_menu', args=['item']) + '?q=%d' % (obj.id),)
msg = 'Section "%s" created successfully. Now you can <a href="%s">add a menu item now</a> or configure section options below.' % (obj.name, reverse('dashboard_add_menu', args=['item']) + '?pk=%d' % (obj.id),)
def add_edit_menu(request, object_type, object_id=None): model = get_model('core', object_type) form_dict = { 'section': SectionForm, 'item': get_item_form(request.site) } instance = None form_class = form_dict[object_type] if object_id is not None: instance = get_object_or_404(model, id=object_id) if instance and instance.site != request.site: raise Http404() if request.method == 'POST': form = form_class(request.POST, instance=instance) if form.is_valid(): obj = form.save(commit=False) obj.site = request.site obj.save() verb = 'edited' if instance else 'created' if instance: redirect_to = reverse('dashboard_menu') msg = '%s updated successfully.' % object_type.title() else: redirect_to = reverse('dashboard_edit_options', args=[object_type, obj.id]) if object_type == 'section': msg = 'Section "%s" created successfully. Now you can <a href="%s">add a menu item now</a> or configure section options below.' % (obj.name, reverse('dashboard_add_menu', args=['item']) + '?q=%d' % (obj.id),) else: msg = 'Menu item "%s" created successfully. You can configure section options below.' % obj.name messages.success(request, msg) return HttpResponseRedirect(redirect_to) else: form_kwds = {} if all([instance is None, request.GET.get('pk'), model == Item]): form_kwds['initial'] = {'section': request.GET['pk'], 'taxable': True} form = form_class(instance=instance, **form_kwds) return direct_to_template(request, template='dashboard/menu/%s_form.html' % object_type, extra_context={ 'form': form, 'object': instance, 'type': object_type })
47b5179d4413b0f8ab16d22694cecc6649e39e33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9903/47b5179d4413b0f8ab16d22694cecc6649e39e33/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 4619, 67, 5414, 12, 2293, 16, 733, 67, 723, 16, 733, 67, 350, 33, 7036, 4672, 938, 273, 336, 67, 2284, 2668, 3644, 2187, 733, 67, 723, 13, 646, 67, 1576, 273, 288, 296, 3464, 4278, 10092, 1204, 16, 296, 1726, 4278, 336, 67, 1726, 67, 687, 12, 2293, 18, 4256, 13, 289, 791, 273, 599, 646, 67, 1106, 273, 646, 67, 1576, 63, 1612, 67, 723, 65, 309, 733, 67, 350, 353, 486, 599, 30, 791, 273, 336, 67, 1612, 67, 280, 67, 11746, 12, 2284, 16, 612, 33, 1612, 67, 350, 13, 309, 791, 471, 791, 18, 4256, 480, 590, 18, 4256, 30, 1002, 2541, 11746, 1435, 309, 590, 18, 2039, 422, 296, 3798, 4278, 646, 273, 646, 67, 1106, 12, 2293, 18, 3798, 16, 791, 33, 1336, 13, 309, 646, 18, 291, 67, 877, 13332, 1081, 273, 646, 18, 5688, 12, 7371, 33, 8381, 13, 1081, 18, 4256, 273, 590, 18, 4256, 1081, 18, 5688, 1435, 6405, 273, 296, 28752, 11, 309, 791, 469, 296, 4824, 11, 309, 791, 30, 3136, 67, 869, 273, 4219, 2668, 13479, 67, 5414, 6134, 1234, 273, 1995, 87, 3526, 4985, 1093, 738, 733, 67, 723, 18, 2649, 1435, 469, 30, 3136, 67, 869, 273, 4219, 2668, 13479, 67, 4619, 67, 2116, 2187, 833, 22850, 1612, 67, 723, 16, 1081, 18, 350, 5717, 309, 733, 67, 723, 422, 296, 3464, 4278, 1234, 273, 296, 5285, 2213, 87, 6, 2522, 4985, 18, 4494, 1846, 848, 411, 69, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 4619, 67, 5414, 12, 2293, 16, 733, 67, 723, 16, 733, 67, 350, 33, 7036, 4672, 938, 273, 336, 67, 2284, 2668, 3644, 2187, 733, 67, 723, 13, 646, 67, 1576, 273, 288, 296, 3464, 4278, 10092, 1204, 16, 296, 1726, 4278, 336, 67, 1726, 67, 687, 12, 2293, 18, 4256, 13, 289, 791, 273, 599, 646, 67, 1106, 273, 646, 67, 1576, 63, 1612, 67, 723, 65, 309, 733, 67, 350, 353, 486, 599, 30, 791, 273, 336, 67, 1612, 67, 280, 67, 11746, 12, 2284, 16, 612, 33, 1612, 67, 350, 13, 309, 791, 471, 791, 18, 4256, 480, 590, 18, 4256, 30, 1002, 2541, 11746, 1435, 309, 590, 18, 2039, 422, 296, 3798, 2 ]
def strbase(self, l): """Probably not the best way of doing it but this function returns a common base string in a list of strings (for tab completion).""" if not l: return '' elif len(l) == 1: return l[0] sl = sorted(l, key=len) for i, c in enumerate(l[-1]): if not reduce(lambda x, y: (x and y) or False, (k.startswith(l[-1][:i]) for k in sl), True): break return l[-1][:i-1]
def tab(self): """Process the tab key being hit. If there's only whitespace in the line or the line is blank then process a normal tab, otherwise attempt to autocomplete to the best match of possible choices in the match list."""
2c8612f9cbc0abb05f90d9f3e3493782a5417581 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6932/2c8612f9cbc0abb05f90d9f3e3493782a5417581/cli.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3246, 12, 2890, 4672, 3536, 2227, 326, 3246, 498, 3832, 6800, 18, 971, 1915, 1807, 1338, 7983, 316, 326, 980, 578, 326, 980, 353, 7052, 1508, 1207, 279, 2212, 3246, 16, 3541, 4395, 358, 21429, 358, 326, 3796, 845, 434, 3323, 7246, 316, 326, 845, 666, 12123, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3246, 12, 2890, 4672, 3536, 2227, 326, 3246, 498, 3832, 6800, 18, 971, 1915, 1807, 1338, 7983, 316, 326, 980, 578, 326, 980, 353, 7052, 1508, 1207, 279, 2212, 3246, 16, 3541, 4395, 358, 21429, 358, 326, 3796, 845, 434, 3323, 7246, 316, 326, 845, 666, 12123, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
pass
def migrate_project(old, old_parent, new_parent, f): new = None if callable(old.id): obj_id = old.id() else: obj_id = old.id portal_types = parent.portal_types portal_types.constructContent('Project', new_parent, obj_id) print old.Title() new = new_parent[obj_id] # set fields new.update(title=old.title) new.setBasin(old.getBasin() ) new.SetCountry(update_countries(old.getCountry())) new.setEnd_date(old.getEnd_date() ) new.setFocal_area(old.getFocal_area() ) new.setGef_project_allocation(old.getGef_project_allocation() ) new.setGef_project_id(old.getGef_project_id ) new.setGlobalproject('Global' in old.getRegion()) new.setLatitude(old.getLeadagency() ) new.setLongitude(old.getLongitude() ) new.setOperational_programme(old.getOperational_programme() ) new.setProject_status(old.getProject_status() ) new.setProject_summary( '<div class="migration-tbd">' + ', '.join(old.getExecuting_agency()) + '</div> <hr/> <br/>' + old.getSummary_project_description() + '<p><hr/></p>' + old.getProject_results()) new.setProject_type(old.getProject_type() ) new.setRemote_url(old.getProject_website_address() ) new.setStart_date(old.getStart_date() ) new.setStrategic_priority(old.getStrategic_priority() ) new.setTotal_cost(old.getTotal_cost() )
a7515b372064702005964c649711105373e02dc7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6024/a7515b372064702005964c649711105373e02dc7/migrate_projects.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13187, 67, 4406, 12, 1673, 16, 1592, 67, 2938, 16, 394, 67, 2938, 16, 284, 4672, 394, 273, 599, 309, 4140, 12, 1673, 18, 350, 4672, 1081, 67, 350, 273, 1592, 18, 350, 1435, 469, 30, 1081, 67, 350, 273, 1592, 18, 350, 11899, 67, 2352, 273, 982, 18, 24386, 67, 2352, 11899, 67, 2352, 18, 10062, 1350, 2668, 4109, 2187, 394, 67, 2938, 16, 1081, 67, 350, 13, 1172, 1592, 18, 4247, 1435, 394, 273, 394, 67, 2938, 63, 2603, 67, 350, 65, 468, 444, 1466, 394, 18, 2725, 12, 2649, 33, 1673, 18, 2649, 13, 394, 18, 542, 11494, 267, 12, 1673, 18, 588, 11494, 267, 1435, 262, 394, 18, 694, 8142, 12, 2725, 67, 22904, 12, 1673, 18, 588, 8142, 1435, 3719, 394, 18, 542, 1638, 67, 712, 12, 1673, 18, 588, 1638, 67, 712, 1435, 262, 394, 18, 542, 42, 23735, 67, 5036, 12, 1673, 18, 588, 42, 23735, 67, 5036, 1435, 262, 394, 18, 542, 43, 10241, 67, 4406, 67, 29299, 12, 1673, 18, 588, 43, 10241, 67, 4406, 67, 29299, 1435, 262, 394, 18, 542, 43, 10241, 67, 4406, 67, 350, 12, 1673, 18, 588, 43, 10241, 67, 4406, 67, 350, 262, 394, 18, 542, 5160, 4406, 2668, 5160, 11, 316, 1592, 18, 588, 5165, 10756, 394, 18, 542, 16890, 12, 1673, 18, 588, 9678, 346, 2075, 1435, 262, 394, 18, 542, 20179, 12, 1673, 18, 588, 20179, 1435, 262, 394, 18, 542, 2988, 287, 67, 12890, 3501, 12, 1673, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13187, 67, 4406, 12, 1673, 16, 1592, 67, 2938, 16, 394, 67, 2938, 16, 284, 4672, 394, 273, 599, 309, 4140, 12, 1673, 18, 350, 4672, 1081, 67, 350, 273, 1592, 18, 350, 1435, 469, 30, 1081, 67, 350, 273, 1592, 18, 350, 11899, 67, 2352, 273, 982, 18, 24386, 67, 2352, 11899, 67, 2352, 18, 10062, 1350, 2668, 4109, 2187, 394, 67, 2938, 16, 1081, 67, 350, 13, 1172, 1592, 18, 4247, 1435, 394, 273, 394, 67, 2938, 63, 2603, 67, 350, 65, 468, 444, 1466, 394, 18, 2725, 12, 2649, 33, 1673, 18, 2649, 13, 394, 18, 542, 11494, 267, 12, 1673, 18, 588, 11494, 267, 1435, 262, 394, 18, 694, 8142, 12, 2725, 67, 22904, 2 ]
file.Write(" uint32 data_size = ComputeImmediateDataSize(" "immediate_data_size, 1, sizeof(%s), %d);\n" % (func.info.data_type, func.info.count))
code = """ uint32 data_size; if (!ComputeDataSize(1, sizeof(%s), %d, &data_size)) { return error::kOutOfBounds; } """ file.Write(code % (func.info.data_type, func.info.count)) if func.is_immediate: file.Write(" if (data_size > immediate_data_size) {\n") file.Write(" return error::kOutOfBounds;\n") file.Write(" }\n")
def WriteGetDataSizeCode(self, func, file): """Overrriden from TypeHandler.""" file.Write(" uint32 data_size = ComputeImmediateDataSize(" "immediate_data_size, 1, sizeof(%s), %d);\n" % (func.info.data_type, func.info.count))
1f35d386075e8cecf4b328e98191a11effa0fd1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/1f35d386075e8cecf4b328e98191a11effa0fd1a/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 967, 29414, 1085, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 585, 18, 3067, 2932, 225, 2254, 1578, 501, 67, 1467, 273, 8155, 22651, 29414, 2932, 315, 381, 6785, 67, 892, 67, 1467, 16, 404, 16, 13726, 9275, 87, 3631, 738, 72, 20472, 82, 6, 738, 261, 644, 18, 1376, 18, 892, 67, 723, 16, 1326, 18, 1376, 18, 1883, 3719, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 967, 29414, 1085, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 585, 18, 3067, 2932, 225, 2254, 1578, 501, 67, 1467, 273, 8155, 22651, 29414, 2932, 315, 381, 6785, 67, 892, 67, 1467, 16, 404, 16, 13726, 9275, 87, 3631, 738, 72, 20472, 82, 6, 738, 261, 644, 18, 1376, 18, 892, 67, 723, 16, 1326, 18, 1376, 18, 1883, 3719, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
cmd = cmd + ' "' + THIRDPARTY + 'ssl/lib/ssleay32.lib"' cmd = cmd + ' "' + THIRDPARTY + 'ssl/lib/libeay32.lib"'
cmd = cmd + ' ' + THIRDPARTY + 'ssl/lib/ssleay32.lib' cmd = cmd + ' ' + THIRDPARTY + 'ssl/lib/libeay32.lib'
def CompileLink(dll=0, obj=[], opts=[], xdep=[]): if (dll==0): sys.exit("Syntax error in CompileLink directive") if (COMPILER=="MSVC7"): ALLTARGETS.append(PREFIX+"/bin/"+dll) lib = PREFIX+"/lib/"+dll[:-4]+".lib" dll = PREFIX+"/bin/"+dll wobj = [] for x in obj: suffix = x[-4:] if (suffix==".obj"): wobj.append(PREFIX+"/tmp/"+x) elif (suffix==".dll"): wobj.append(PREFIX+"/lib/"+x[:-4]+".lib") elif (suffix==".lib"): wobj.append(PREFIX+"/lib/"+x) elif (suffix==".res"): wobj.append(PREFIX+"/tmp/"+x) else: sys.exit("unknown suffix in object list.") if (older(dll, wobj+xdep)): cmd = 'link.exe /nologo /NODEFAULTLIB:LIBCI.LIB' if (dll[-4:]!=".exe"): cmd = cmd + " /DLL" if (OPTIMIZE==1): cmd = cmd + " /DEBUG /NODEFAULTLIB:MSVCRT.LIB " if (OPTIMIZE==2): cmd = cmd + " /DEBUG /NODEFAULTLIB:MSVCRT.LIB " if (OPTIMIZE==3): cmd = cmd + " /DEBUG /NODEFAULTLIB:MSVCRTD.LIB /OPT:REF " if (OPTIMIZE==4): cmd = cmd + " /DEBUG /NODEFAULTLIB:MSVCRTD.LIB /OPT:REF /LTCG " cmd = cmd + " /MAP /MAPINFO:EXPORTS /MAPINFO:LINES /fixed:no /incremental:no /stack:4194304 " if (opts.count("NOLIBCI")): cmd = cmd + " /NODEFAULTLIB:LIBCI.LIB " if (opts.count("MAXEGGDEF")): cmd = cmd + ' /DEF:pandatool/src/maxegg/MaxEgg.def' cmd = cmd + ' /OUT:"' + dll + '" /IMPLIB:"' + lib + '" /MAP:NUL' cmd = cmd + ' /LIBPATH:"' + PREFIX + '/python/libs" ' for x in wobj: cmd = cmd + ' "' + x + '"' if (dll[-4:]==".exe"): cmd = cmd + ' "' + PREFIX + '/tmp/pandaIcon.res"' if (opts.count("D3D8") or opts.count("D3D9") or opts.count("DXDRAW") or opts.count("DXSOUND") or opts.count("DXGUID")): cmd = cmd + ' /LIBPATH:"' + DIRECTXSDK + 'lib/x86"' cmd = cmd + ' /LIBPATH:"' + DIRECTXSDK + 'lib"' if (opts.count("D3D8")): cmd = cmd + ' d3d8.lib d3dx8.lib dxerr8.lib' if (opts.count("D3D9")): cmd = cmd + ' d3d9.lib d3dx9.lib dxerr9.lib' if (opts.count("DXDRAW")): cmd = cmd + ' ddraw.lib' if (opts.count("DXSOUND")): cmd = cmd + ' dsound.lib' if (opts.count("DXGUID")): cmd = cmd + ' dxguid.lib' if (opts.count("WINSOCK")): cmd = cmd + " wsock32.lib" if (opts.count("WINSOCK2")): cmd = cmd + " wsock32.lib ws2_32.lib" if (opts.count("WINCOMCTL")): cmd = cmd + ' comctl32.lib' if (opts.count("WINUSER")): cmd = cmd + " user32.lib" if (opts.count("WINMM")): cmd = cmd + " winmm.lib" if (opts.count("WINIMM")): cmd = cmd + " imm32.lib" if (opts.count("WINKERNEL")): cmd = cmd + " kernel32.lib" if (opts.count("WINOLDNAMES")): cmd = cmd + " oldnames.lib" if (opts.count("WINGDI")): cmd = cmd + " gdi32.lib" if (opts.count("ADVAPI")): cmd = cmd + " advapi32.lib" if (opts.count("GLUT")): cmd = cmd + " opengl32.lib glu32.lib" if (PkgSelected(opts,"ZLIB")): cmd = cmd + ' "' + THIRDPARTY + 'zlib/lib/libz.lib"' if (PkgSelected(opts,"PNG")): cmd = cmd + ' "' + THIRDPARTY + 'png/lib/libpng.lib"' if (PkgSelected(opts,"JPEG")): cmd = cmd + ' "' + THIRDPARTY + 'jpeg/lib/libjpeg.lib"' if (PkgSelected(opts,"TIFF")): cmd = cmd + ' "' + THIRDPARTY + 'tiff/lib/libtiff.lib"' if (PkgSelected(opts,"VRPN")): cmd = cmd + ' "' + THIRDPARTY + 'vrpn/lib/vrpn.lib"' cmd = cmd + ' "' + THIRDPARTY + 'vrpn/lib/quat.lib"' if (PkgSelected(opts,"FMOD")): cmd = cmd + ' "' + THIRDPARTY + 'fmod/lib/fmod.lib"' if (PkgSelected(opts,"MILES")): cmd = cmd + ' "' + THIRDPARTY + 'miles/lib/mss32.lib"' if (PkgSelected(opts,"NVIDIACG")): if (opts.count("CGGL")): cmd = cmd + ' "' + THIRDPARTY + 'nvidiacg/lib/cgGL.lib"' cmd = cmd + ' "' + THIRDPARTY + 'nvidiacg/lib/cg.lib"' if (PkgSelected(opts,"HELIX")): cmd = cmd + ' "' + THIRDPARTY + 'helix/lib/runtlib.lib"' cmd = cmd + ' "' + THIRDPARTY + 'helix/lib/syslib.lib"' cmd = cmd + ' "' + THIRDPARTY + 'helix/lib/contlib.lib"' cmd = cmd + ' "' + THIRDPARTY + 'helix/lib/debuglib.lib"' cmd = cmd + ' "' + THIRDPARTY + 'helix/lib/utillib.lib"' cmd = cmd + ' "' + THIRDPARTY + 'helix/lib/stlport_vc7.lib"' if (PkgSelected(opts,"NSPR")): cmd = cmd + ' "' + THIRDPARTY + 'nspr/lib/libnspr4.lib"' if (PkgSelected(opts,"SSL")): cmd = cmd + ' "' + THIRDPARTY + 'ssl/lib/ssleay32.lib"' cmd = cmd + ' "' + THIRDPARTY + 'ssl/lib/libeay32.lib"' if (PkgSelected(opts,"FREETYPE")): cmd = cmd + ' "' + THIRDPARTY + 'freetype/lib/libfreetype.lib"' if (PkgSelected(opts,"FFTW")): cmd = cmd + ' "' + THIRDPARTY + 'fftw/lib/rfftw.lib"' cmd = cmd + ' "' + THIRDPARTY + 'fftw/lib/fftw.lib"' if (PkgSelected(opts,"MAYA5")): cmd = cmd + ' "' + Maya5SDK + 'lib/Foundation.lib"' cmd = cmd + ' "' + Maya5SDK + 'lib/OpenMaya.lib"' cmd = cmd + ' "' + Maya5SDK + 'lib/OpenMayaAnim.lib"' if (PkgSelected(opts,"MAYA6")): cmd = cmd + ' "' + Maya6SDK + 'lib/Foundation.lib"' cmd = cmd + ' "' + Maya6SDK + 'lib/OpenMaya.lib"' cmd = cmd + ' "' + Maya6SDK + 'lib/OpenMayaAnim.lib"' for max in ["MAX5","MAX6","MAX7"]: if PkgSelected(opts,max): cmd = cmd + ' "' + MAXSDK[max] + 'lib/core.lib"' cmd = cmd + ' "' + MAXSDK[max] + 'lib/mesh.lib"' cmd = cmd + ' "' + MAXSDK[max] + 'lib/maxutil.lib"' cmd = cmd + ' "' + MAXSDK[max] + 'lib/paramblk2.lib"' oscmd(cmd) updatefiledate(dll) if ((OPTIMIZE == 1) and (dll[-4:]==".dll")): CopyFile(dll[:-4]+"_d.dll", dll) if (COMPILER=="LINUXA"): ALLTARGETS.append(PREFIX+"/lib/"+dll[:-4]+".so") if (dll[-4:]==".exe"): wdll = PREFIX+"/bin/"+dll[:-4] else: wdll = PREFIX+"/lib/"+dll[:-4]+".so" wobj = [] for x in obj: suffix = x[-4:] if (suffix==".obj"): wobj.append(PREFIX+"/tmp/"+x[:-4]+".o") elif (suffix==".dll"): wobj.append(PREFIX+"/lib/"+x[:-4]+".so") elif (suffix==".lib"): wobj.append(PREFIX+"/lib/"+x[:-4]+".a") else: sys.exit("unknown suffix in object list.") if (older(wdll, wobj+xdep)): if (dll[-4:]==".exe"): cmd = 'g++ -o "' + wdll + '" -L"' + PREFIX + '/lib"' else: cmd = 'g++ -shared -o "' + wdll + '" -L"' + PREFIX + '/lib"' for x in obj: suffix = x[-4:] if (suffix==".obj"): cmd = cmd + ' "' + PREFIX + '/tmp/' + x[:-4] + '.o"' elif (suffix==".dll"): cmd = cmd + ' -l' + x[3:-4] elif (suffix==".lib"): cmd = cmd + ' "' + PREFIX + '/lib/' + x[:-4] + '.a"' if (PkgSelected(opts,"FMOD")): cmd = cmd + ' -L"' + THIRDPARTY + 'fmod/lib" -lfmod-3.74' if (PkgSelected(opts,"NVIDIACG")): cmd = cmd + ' -L"' + THIRDPARTY + 'nvidiacg/lib" ' if (opts.count("CGGL")): cmd = cmd + " -lCgGL" cmd = cmd + " -lCg" if (PkgSelected(opts,"NSPR")): cmd = cmd + ' -L"' + THIRDPARTY + 'nspr/lib" -lpandanspr4' if (PkgSelected(opts,"ZLIB")): cmd = cmd + " -lz" if (PkgSelected(opts,"PNG")): cmd = cmd + " -lpng" if (PkgSelected(opts,"JPEG")): cmd = cmd + " -ljpeg" if (PkgSelected(opts,"TIFF")): cmd = cmd + " -ltiff" if (PkgSelected(opts,"SSL")): cmd = cmd + " -lssl" if (PkgSelected(opts,"FREETYPE")): cmd = cmd + " -lfreetype" if (PkgSelected(opts,"VRPN")): cmd = cmd + ' -L"' + THIRDPARTY + 'vrpn/lib" -lvrpn -lquat' if (PkgSelected(opts,"FFTW")): cmd = cmd + ' -L"' + THIRDPARTY + 'fftw/lib" -lrfftw -lfftw' if (opts.count("GLUT")): cmd = cmd + " -lGL -lGLU" oscmd(cmd) updatefiledate(wdll)
e743cb25c4127c99b6bf2de385cf618b18e32531 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/e743cb25c4127c99b6bf2de385cf618b18e32531/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16143, 2098, 12, 27670, 33, 20, 16, 1081, 22850, 6487, 1500, 22850, 6487, 619, 15037, 33, 8526, 4672, 309, 261, 27670, 631, 20, 4672, 2589, 18, 8593, 2932, 8070, 555, 316, 16143, 2098, 8655, 7923, 225, 309, 261, 31075, 14668, 31713, 3537, 13464, 27, 6, 4672, 8061, 16374, 55, 18, 6923, 12, 6307, 9078, 19, 4757, 4898, 15, 27670, 13, 2561, 273, 17154, 9078, 19, 2941, 4898, 15, 27670, 10531, 17, 24, 3737, 9654, 2941, 6, 302, 2906, 273, 17154, 9078, 19, 4757, 4898, 15, 27670, 341, 2603, 273, 5378, 364, 619, 316, 1081, 30, 3758, 273, 619, 18919, 24, 26894, 309, 282, 261, 8477, 631, 9654, 2603, 6, 4672, 341, 2603, 18, 6923, 12, 6307, 9078, 19, 5645, 4898, 15, 92, 13, 1327, 261, 8477, 631, 9654, 27670, 6, 4672, 341, 2603, 18, 6923, 12, 6307, 9078, 19, 2941, 4898, 15, 92, 10531, 17, 24, 3737, 9654, 2941, 7923, 1327, 261, 8477, 631, 9654, 2941, 6, 4672, 341, 2603, 18, 6923, 12, 6307, 9078, 19, 2941, 4898, 15, 92, 13, 1327, 261, 8477, 631, 9654, 455, 6, 4672, 341, 2603, 18, 6923, 12, 6307, 9078, 19, 5645, 4898, 15, 92, 13, 469, 30, 2589, 18, 8593, 2932, 8172, 3758, 316, 733, 666, 1199, 13, 309, 261, 1498, 12, 27670, 16, 341, 2603, 15, 92, 15037, 3719, 30, 1797, 273, 296, 1232, 18, 14880, 342, 82, 3966, 83, 342, 8744, 2636, 14484, 30, 14484, 7266, 18, 14484, 11, 309, 261, 27670, 18919, 24, 26894, 5, 1546, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16143, 2098, 12, 27670, 33, 20, 16, 1081, 22850, 6487, 1500, 22850, 6487, 619, 15037, 33, 8526, 4672, 309, 261, 27670, 631, 20, 4672, 2589, 18, 8593, 2932, 8070, 555, 316, 16143, 2098, 8655, 7923, 225, 309, 261, 31075, 14668, 31713, 3537, 13464, 27, 6, 4672, 8061, 16374, 55, 18, 6923, 12, 6307, 9078, 19, 4757, 4898, 15, 27670, 13, 2561, 273, 17154, 9078, 19, 2941, 4898, 15, 27670, 10531, 17, 24, 3737, 9654, 2941, 6, 302, 2906, 273, 17154, 9078, 19, 4757, 4898, 15, 27670, 341, 2603, 273, 5378, 364, 619, 316, 1081, 30, 3758, 273, 619, 18919, 24, 26894, 309, 282, 261, 8477, 631, 9654, 2603, 6, 4672, 341, 2603, 18, 6923, 12, 6307, 9078, 19, 2 ]
if err.code == 403 and uri.startwith('http://en.wikipedia.org/'):
if err.code == 403 and uri.startswith('http://en.wikipedia.org/'):
def resolve(self, uri): try: f = urlopen(uri) f.close() except HTTPError, err: if err.code == 403 and uri.startwith('http://en.wikipedia.org/'): # Wikipedia blocks requests from urllib User-Agent return 0 return (2, str(err)) except Exception, err: return (2, str(err)) if f.url.rstrip('/') == uri.rstrip('/'): return (0, 0) else: return (1, f.url)
460d3fdbb756287906add15dd8b45754fb7ccab4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5532/460d3fdbb756287906add15dd8b45754fb7ccab4/builder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2245, 12, 2890, 16, 2003, 4672, 775, 30, 284, 273, 19613, 12, 1650, 13, 284, 18, 4412, 1435, 1335, 14415, 16, 393, 30, 309, 393, 18, 710, 422, 14393, 471, 2003, 18, 17514, 1918, 2668, 2505, 2207, 275, 18, 11999, 13744, 18, 3341, 2473, 4672, 468, 678, 16049, 4398, 3285, 628, 11527, 2177, 17, 3630, 327, 374, 327, 261, 22, 16, 609, 12, 370, 3719, 1335, 1185, 16, 393, 30, 327, 261, 22, 16, 609, 12, 370, 3719, 309, 284, 18, 718, 18, 86, 6406, 2668, 2473, 13, 422, 2003, 18, 86, 6406, 2668, 2473, 4672, 327, 261, 20, 16, 374, 13, 469, 30, 327, 261, 21, 16, 284, 18, 718, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2245, 12, 2890, 16, 2003, 4672, 775, 30, 284, 273, 19613, 12, 1650, 13, 284, 18, 4412, 1435, 1335, 14415, 16, 393, 30, 309, 393, 18, 710, 422, 14393, 471, 2003, 18, 17514, 1918, 2668, 2505, 2207, 275, 18, 11999, 13744, 18, 3341, 2473, 4672, 468, 678, 16049, 4398, 3285, 628, 11527, 2177, 17, 3630, 327, 374, 327, 261, 22, 16, 609, 12, 370, 3719, 1335, 1185, 16, 393, 30, 327, 261, 22, 16, 609, 12, 370, 3719, 309, 284, 18, 718, 18, 86, 6406, 2668, 2473, 13, 422, 2003, 18, 86, 6406, 2668, 2473, 4672, 327, 261, 20, 16, 374, 13, 469, 30, 327, 261, 21, 16, 284, 18, 718, 13, 2, -100, -100, -100, -100, -100, -100 ]
H -- list of elements in ZZ of a subgroup of (Z/NZ)*
H -- list of elements in $\ZZ$ of a subgroup of $(\ZZ/N\ZZ)^*$
def nuinfHreg(N,H): r""" Number of regular cusps for the group $\Gamma_H(N)$ INPUT: N -- an integer H -- list of elements in ZZ of a subgroup of (Z/NZ)* OUTPUT: Integer EXAMPLES: sage: sage.modular.dims.nuinfHreg(33, GammaH(33,[2])._list_of_elements_in_H()) 0 sage: sage.modular.dims.nuinfHreg(7, GammaH(7,[2])._list_of_elements_in_H()) 2 AUTHOR: Jordi Quer """ c = Integer(0) for d in [d for d in divisors(N) if d**Integer(2)<=N]: Nd = lcm(d,N//d) Hd = set([x%Nd for x in H]) if Nd-Integer(1) not in Hd: sumand = euler_phi(d)*euler_phi(N//d)//(Integer(2)*len(Hd)) if d**Integer(2)==N: c = c + sumand else: c = c + Integer(2)*sumand return c
2d5430f87d71c70bab3397c63a6cf10def24c15d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/2d5430f87d71c70bab3397c63a6cf10def24c15d/dims.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9244, 10625, 44, 1574, 12, 50, 16, 44, 4672, 436, 8395, 3588, 434, 6736, 27964, 1121, 364, 326, 1041, 271, 64, 31300, 67, 44, 12, 50, 21877, 225, 12943, 30, 423, 1493, 392, 3571, 670, 1493, 666, 434, 2186, 316, 271, 64, 27096, 8, 434, 279, 720, 1655, 434, 271, 4713, 27096, 19, 50, 64, 27096, 13, 66, 26788, 11550, 30, 2144, 225, 5675, 8900, 11386, 30, 272, 410, 30, 272, 410, 18, 1711, 2490, 18, 8550, 18, 13053, 10625, 44, 1574, 12, 3707, 16, 25409, 44, 12, 3707, 16, 63, 22, 65, 2934, 67, 1098, 67, 792, 67, 6274, 67, 267, 67, 44, 10756, 374, 272, 410, 30, 272, 410, 18, 1711, 2490, 18, 8550, 18, 13053, 10625, 44, 1574, 12, 27, 16, 25409, 44, 12, 27, 16, 63, 22, 65, 2934, 67, 1098, 67, 792, 67, 6274, 67, 267, 67, 44, 10756, 576, 225, 12790, 916, 30, 804, 517, 77, 4783, 264, 3536, 276, 273, 2144, 12, 20, 13, 364, 302, 316, 306, 72, 364, 302, 316, 3739, 291, 1383, 12, 50, 13, 309, 302, 636, 4522, 12, 22, 13, 32, 33, 50, 14542, 19963, 273, 328, 7670, 12, 72, 16, 50, 759, 72, 13, 670, 72, 273, 444, 3816, 92, 9, 50, 72, 364, 619, 316, 670, 5717, 309, 19963, 17, 4522, 12, 21, 13, 486, 316, 670, 72, 30, 2142, 464, 273, 425, 17040, 67, 9973, 12, 72, 17653, 73, 17040, 67, 9973, 12, 50, 759, 72, 13, 759, 12, 4522, 12, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9244, 10625, 44, 1574, 12, 50, 16, 44, 4672, 436, 8395, 3588, 434, 6736, 27964, 1121, 364, 326, 1041, 271, 64, 31300, 67, 44, 12, 50, 21877, 225, 12943, 30, 423, 1493, 392, 3571, 670, 1493, 666, 434, 2186, 316, 271, 64, 27096, 8, 434, 279, 720, 1655, 434, 271, 4713, 27096, 19, 50, 64, 27096, 13, 66, 26788, 11550, 30, 2144, 225, 5675, 8900, 11386, 30, 272, 410, 30, 272, 410, 18, 1711, 2490, 18, 8550, 18, 13053, 10625, 44, 1574, 12, 3707, 16, 25409, 44, 12, 3707, 16, 63, 22, 65, 2934, 67, 1098, 67, 792, 67, 6274, 67, 267, 67, 44, 10756, 374, 272, 410, 30, 272, 410, 18, 1711, 2490, 18, 8550, 18, 13053, 2 ]
self.failIf(int(mo.group('dm')) not in range(1,31))
self.failIf(int(mo.group('dm')) not in range(1,32))
def test_date(self): """ Validate date format Date format hould be compliant with RFC822, we do not support 'military' format """ date_str = r"^((?P<day>\w{3}),\s*)*(?P<dm>\d{2})\s+" \ r"(?P<month>\w{3})\s+(?P<year>200\d)\s+" \ r"(?P<hour>\d{2}):(?P<min>[0-5][0-9])" \ r"(:(?P<sec>[0-5][0-9]))*\s" \ r"((?P<tz>\w{2,3})|(?P<offset>[+\-]\d{4}))$" date_re = re.compile(date_str) days = ['Mon','Tue','Wed','Thu','Fri','Sat','Sun'] months = ['Jan','Feb','Mar','Apr','May','Jun', \ 'Jul','Aug','Sep','Oct','Nov','Dec'] tz = ['UT','GMT','EST','EDT','CST','CDT','MST','MDT''PST','PDT'] ticket = Ticket(self.env) ticket['reporter'] = '"Joe User" <[email protected]>' ticket['summary'] = 'This is a summary' ticket.insert() tn = TicketNotifyEmail(self.env) tn.notify(ticket, newticket=True) message = notifysuite.smtpd.get_message() (headers, body) = self.parse_message(message) self.failIf('Date' not in headers) mo = date_re.match(headers['Date']) self.failIf(not mo) if mo.group('day'): self.failIf(mo.group('day') not in days) self.failIf(int(mo.group('dm')) not in range(1,31)) self.failIf(mo.group('month') not in months) self.failIf(int(mo.group('hour')) not in range(0,24)) if mo.group('tz'): self.failIf(mo.group('tz') not in tz)
c32e94520a1636b192f1961ea23f108b06b7cb88 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/c32e94520a1636b192f1961ea23f108b06b7cb88/notification.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 712, 12, 2890, 4672, 3536, 3554, 1509, 740, 2167, 740, 366, 1006, 506, 24820, 598, 8372, 24532, 16, 732, 741, 486, 2865, 296, 81, 330, 305, 814, 11, 740, 3536, 1509, 67, 701, 273, 436, 6, 29020, 3680, 52, 32, 2881, 5333, 91, 95, 23, 97, 3631, 64, 87, 12437, 14, 3680, 52, 32, 10956, 5333, 72, 95, 22, 31919, 87, 9078, 521, 436, 6, 3680, 52, 32, 7496, 5333, 91, 95, 23, 31919, 87, 15, 3680, 52, 32, 6874, 34, 6976, 64, 72, 5153, 87, 9078, 521, 436, 6, 3680, 52, 32, 12091, 5333, 72, 95, 22, 97, 4672, 3680, 52, 32, 1154, 23224, 20, 17, 25, 6362, 20, 17, 29, 65, 2225, 521, 436, 6, 20510, 3680, 52, 32, 3321, 23224, 20, 17, 25, 6362, 20, 17, 29, 22643, 12174, 87, 6, 521, 436, 6, 12, 3680, 52, 32, 12994, 5333, 91, 95, 22, 16, 23, 6792, 96, 3680, 52, 32, 3348, 23224, 15, 12907, 13944, 72, 95, 24, 31700, 12911, 1509, 67, 266, 273, 283, 18, 11100, 12, 712, 67, 701, 13, 4681, 273, 10228, 11415, 17023, 56, 344, 17023, 59, 329, 17023, 1315, 89, 17023, 42, 566, 17023, 15163, 17023, 29636, 3546, 8846, 273, 10228, 46, 304, 17023, 2954, 70, 17023, 49, 297, 17023, 37, 683, 17023, 49, 528, 17023, 46, 318, 2187, 521, 296, 46, 332, 17023, 37, 637, 17023, 5097, 17023, 19320, 17023, 50, 1527, 17023, 1799, 3546, 6016, 273, 10228, 1693, 17023, 25315, 17023, 11027, 17023, 2056, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 712, 12, 2890, 4672, 3536, 3554, 1509, 740, 2167, 740, 366, 1006, 506, 24820, 598, 8372, 24532, 16, 732, 741, 486, 2865, 296, 81, 330, 305, 814, 11, 740, 3536, 1509, 67, 701, 273, 436, 6, 29020, 3680, 52, 32, 2881, 5333, 91, 95, 23, 97, 3631, 64, 87, 12437, 14, 3680, 52, 32, 10956, 5333, 72, 95, 22, 31919, 87, 9078, 521, 436, 6, 3680, 52, 32, 7496, 5333, 91, 95, 23, 31919, 87, 15, 3680, 52, 32, 6874, 34, 6976, 64, 72, 5153, 87, 9078, 521, 436, 6, 3680, 52, 32, 12091, 5333, 72, 95, 22, 97, 4672, 3680, 52, 32, 1154, 23224, 20, 17, 25, 6362, 20, 17, 29, 65, 2225, 521, 436, 2 ]
mime_type = self.get_string("output-mime-type")
def set_widget_initial_values(self, glade): self.quality_tabs.set_show_tabs(False) if self.get_int("same-folder-as-input"): w = glade.get_widget("same_folder_as_input") else: w = glade.get_widget("into_selected_folder") w.set_active(True) self.target_folder_chooser.set_filename( self.get_string("selected-folder")) self.update_selected_folder() w = glade.get_widget("create_subfolders") w.set_active(self.get_int("create-subfolders")) w = glade.get_widget("subfolder_pattern") model = w.get_model() model.clear() for pattern, desc in self.subfolder_patterns: iter = model.append() model.set(iter, 0, desc) w.set_active(self.get_int("subfolder-pattern-index"))
fb263caf044aa99ff978564e088e8ab6a2b54428 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2369/fb263caf044aa99ff978564e088e8ab6a2b54428/soundconverter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 6587, 67, 6769, 67, 2372, 12, 2890, 16, 5118, 2486, 4672, 225, 365, 18, 16495, 67, 16056, 18, 542, 67, 4500, 67, 16056, 12, 8381, 13, 225, 309, 365, 18, 588, 67, 474, 2932, 14307, 17, 5609, 17, 345, 17, 2630, 6, 4672, 341, 273, 5118, 2486, 18, 588, 67, 6587, 2932, 14307, 67, 5609, 67, 345, 67, 2630, 7923, 469, 30, 341, 273, 5118, 2486, 18, 588, 67, 6587, 2932, 18591, 67, 8109, 67, 5609, 7923, 341, 18, 542, 67, 3535, 12, 5510, 13, 225, 365, 18, 3299, 67, 5609, 67, 2599, 13164, 18, 542, 67, 3459, 12, 365, 18, 588, 67, 1080, 2932, 8109, 17, 5609, 6, 3719, 365, 18, 2725, 67, 8109, 67, 5609, 1435, 225, 341, 273, 5118, 2486, 18, 588, 67, 6587, 2932, 2640, 67, 1717, 16064, 7923, 341, 18, 542, 67, 3535, 12, 2890, 18, 588, 67, 474, 2932, 2640, 17, 1717, 16064, 6, 3719, 225, 341, 273, 5118, 2486, 18, 588, 67, 6587, 2932, 1717, 5609, 67, 4951, 7923, 938, 273, 341, 18, 588, 67, 2284, 1435, 938, 18, 8507, 1435, 364, 1936, 16, 3044, 316, 365, 18, 1717, 5609, 67, 13317, 30, 1400, 273, 938, 18, 6923, 1435, 938, 18, 542, 12, 2165, 16, 374, 16, 3044, 13, 341, 18, 542, 67, 3535, 12, 2890, 18, 588, 67, 474, 2932, 1717,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, 345, 17, 2630, 6, 4672, 341, 273, 5118, 2486, 18, 588, 67, 6587, 2932, 14307, 67, 5609, 67, 345, 67, 2630, 7923, 469, 30, 341, 273, 5118, 2486, 18, 588, 67, 6587, 2932, 18591, 67, 8109, 67, 5609, 7923, 341, 18, 542, 67, 3535, 12, 5510, 13, 225, 365, 18, 3299, 67, 5609, 67, 2599, 13164, 18, 542, 67, 3459, 12, 365, 18, 588, 67, 1080, 2932, 8109, 17, 5609, 6, 3719, 365, 18, 2725, 67, 8109, 67, 2 ]
if dtype is None: dtype = data.dtype kwargs['dtype'] = dtype
if dtype is not None: kwargs['dtype'] = dtype
def mov_sum(data, span, dtype=None): """Calculates the moving sum of a series.
86b48c840b475928675ea22e4fc3f751d391539e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12971/86b48c840b475928675ea22e4fc3f751d391539e/moving_funcs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5730, 67, 1364, 12, 892, 16, 4548, 16, 3182, 33, 7036, 4672, 3536, 10587, 326, 12499, 2142, 434, 279, 4166, 18, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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67, 1364, 12, 892, 16, 4548, 16, 3182, 33, 7036, 4672, 3536, 10587, 326, 12499, 2142, 434, 279, 4166, 18, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
channel.tcp_client_key = addr
if channel.tcp_connect (addr, timeout): return channel return
def tcp_client (self, addr): try: return self.tcp_client_channels[addr] except KeyError: channel = self.tcp_client_channel (addr) channel.tcp_client_key = addr
f19266ef2fa4ea7abefd4a83bebaddf370d50620 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2577/f19266ef2fa4ea7abefd4a83bebaddf370d50620/tcp_client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9658, 67, 2625, 261, 2890, 16, 3091, 4672, 775, 30, 327, 365, 18, 14832, 67, 2625, 67, 9114, 63, 4793, 65, 225, 1335, 4999, 30, 1904, 273, 365, 18, 14832, 67, 2625, 67, 4327, 261, 4793, 13, 309, 1904, 18, 14832, 67, 3612, 261, 4793, 16, 2021, 4672, 327, 1904, 225, 327, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9658, 67, 2625, 261, 2890, 16, 3091, 4672, 775, 30, 327, 365, 18, 14832, 67, 2625, 67, 9114, 63, 4793, 65, 225, 1335, 4999, 30, 1904, 273, 365, 18, 14832, 67, 2625, 67, 4327, 261, 4793, 13, 309, 1904, 18, 14832, 67, 3612, 261, 4793, 16, 2021, 4672, 327, 1904, 225, 327, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
args.extend(self._GetTestsFromName(name))
args.extend(self._ImportTestsFromName(name))
def _LoadTestNamesFrom(self, filename): modules= PyUITest.EvalDataFrom(filename) platform = sys.platform if PyUITest.IsChromeOS(): # check if it's chromeos platform = 'chromeos' assert platform in self._platform_map, '%s unsupported' % platform all_names = modules.get('all', []) + \ modules.get(self._platform_map[platform], []) args = [] excluded = [] # Find all excluded tests. Excluded tests begin with '-'. for name in all_names: if name.startswith('-'): # Exclude excluded.extend(self._GetTestsFromName(name[1:])) else: args.extend(self._GetTestsFromName(name)) for name in excluded: if name in args: args.remove(name) else: logging.warn('Cannot exclude %s. Not included. Ignoring' % name) if excluded: logging.debug('Excluded %d test(s): %s' % (len(excluded), excluded)) return args
acb10270e823c9642805757c0060ee77239a8a17 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/acb10270e823c9642805757c0060ee77239a8a17/pyauto.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2563, 4709, 1557, 1265, 12, 2890, 16, 1544, 4672, 4381, 33, 4707, 57, 1285, 395, 18, 13904, 751, 1265, 12, 3459, 13, 4072, 273, 2589, 18, 9898, 309, 4707, 57, 1285, 395, 18, 2520, 28548, 4618, 13332, 225, 468, 866, 309, 518, 1807, 18167, 538, 4072, 273, 296, 343, 10896, 538, 11, 1815, 4072, 316, 365, 6315, 9898, 67, 1458, 16, 1995, 87, 13248, 11, 738, 4072, 777, 67, 1973, 273, 4381, 18, 588, 2668, 454, 2187, 5378, 13, 397, 521, 4381, 18, 588, 12, 2890, 6315, 9898, 67, 1458, 63, 9898, 6487, 5378, 13, 833, 273, 5378, 8845, 273, 5378, 468, 4163, 777, 8845, 7434, 18, 225, 1312, 7908, 7434, 2376, 598, 4014, 18, 364, 508, 316, 777, 67, 1973, 30, 309, 508, 18, 17514, 1918, 2668, 6627, 4672, 225, 468, 20760, 8845, 18, 14313, 12, 2890, 6315, 967, 14650, 29732, 12, 529, 63, 21, 30, 22643, 469, 30, 833, 18, 14313, 12, 2890, 6315, 5010, 14650, 29732, 12, 529, 3719, 364, 508, 316, 8845, 30, 309, 508, 316, 833, 30, 833, 18, 4479, 12, 529, 13, 469, 30, 2907, 18, 8935, 2668, 4515, 4433, 738, 87, 18, 2288, 5849, 18, 467, 16997, 11, 738, 508, 13, 309, 8845, 30, 2907, 18, 4148, 2668, 16461, 738, 72, 1842, 12, 87, 4672, 738, 87, 11, 738, 261, 1897, 12, 24602, 3631, 8845, 3719, 327, 833, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2563, 4709, 1557, 1265, 12, 2890, 16, 1544, 4672, 4381, 33, 4707, 57, 1285, 395, 18, 13904, 751, 1265, 12, 3459, 13, 4072, 273, 2589, 18, 9898, 309, 4707, 57, 1285, 395, 18, 2520, 28548, 4618, 13332, 225, 468, 866, 309, 518, 1807, 18167, 538, 4072, 273, 296, 343, 10896, 538, 11, 1815, 4072, 316, 365, 6315, 9898, 67, 1458, 16, 1995, 87, 13248, 11, 738, 4072, 777, 67, 1973, 273, 4381, 18, 588, 2668, 454, 2187, 5378, 13, 397, 521, 4381, 18, 588, 12, 2890, 6315, 9898, 67, 1458, 63, 9898, 6487, 5378, 13, 833, 273, 5378, 8845, 273, 5378, 468, 4163, 777, 8845, 7434, 18, 225, 1312, 7908, 7434, 2376, 598, 4014, 18, 364, 508, 2 ]
sim.getRNG().setSeed(12345)
sim.getRNG().set(seed=12345)
def randomMove(x, y): '''Pass parental information fields to offspring''' # shift right with high concentration of alleles... off_x = random.normalvariate((x[0]+x[1])/2., 0.1) off_y = random.normalvariate((y[0]+y[1])/2., 0.1) return off_x, off_y
205f55f8c6cd28aed704d70838912648f07ac340 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/401/205f55f8c6cd28aed704d70838912648f07ac340/userGuide.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2744, 7607, 12, 92, 16, 677, 4672, 9163, 6433, 982, 287, 1779, 1466, 358, 21174, 11638, 26418, 468, 4654, 2145, 598, 3551, 20570, 8230, 367, 434, 24634, 2777, 3397, 67, 92, 273, 2744, 18, 6130, 1401, 3840, 12443, 92, 63, 20, 3737, 92, 63, 21, 5717, 19, 22, 12990, 374, 18, 21, 13, 3397, 67, 93, 273, 2744, 18, 6130, 1401, 3840, 12443, 93, 63, 20, 3737, 93, 63, 21, 5717, 19, 22, 12990, 374, 18, 21, 13, 327, 3397, 67, 92, 16, 3397, 67, 93, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2744, 7607, 12, 92, 16, 677, 4672, 9163, 6433, 982, 287, 1779, 1466, 358, 21174, 11638, 26418, 468, 4654, 2145, 598, 3551, 20570, 8230, 367, 434, 24634, 2777, 3397, 67, 92, 273, 2744, 18, 6130, 1401, 3840, 12443, 92, 63, 20, 3737, 92, 63, 21, 5717, 19, 22, 12990, 374, 18, 21, 13, 3397, 67, 93, 273, 2744, 18, 6130, 1401, 3840, 12443, 93, 63, 20, 3737, 93, 63, 21, 5717, 19, 22, 12990, 374, 18, 21, 13, 327, 3397, 67, 92, 16, 3397, 67, 93, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
tags.update({'source':'lukr', 'source:date':'2010-09-18'})
tags.update({'source':'lukr', 'source:date':'2010-09-17'})
def translateAttributes(attrs): if not attrs: return tags = {} #tags on all paths tags.update({'source':'lukr', 'source:date':'2010-09-18'}) tags.update({'lukr:raw':str(attrs).replace("&apos", "")}) #all lukr original tags, including the unique ObjectId. tags.update({'lukr:highway':'footway'}) #remove the lukr: prefix when the path has been reviewed. tags.update({'bicycle':'yes'}) #bicycles are allowed on all roads #add width if it's not zero if attrs['BREIDD'] != ' 0.00': tags = {'width':attrs['BREIDD'].lstrip()}
546c3f9f0a7ba8bc0f50f4e0b764b72f3dcbd129 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14003/546c3f9f0a7ba8bc0f50f4e0b764b72f3dcbd129/lukr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4204, 2498, 12, 7039, 4672, 309, 486, 3422, 30, 327, 225, 2342, 273, 2618, 225, 468, 4156, 603, 777, 2953, 2342, 18, 2725, 12590, 11, 3168, 11, 2497, 80, 19445, 86, 2187, 296, 3168, 30, 712, 11, 2497, 6734, 20, 17, 5908, 17, 4033, 11, 6792, 2342, 18, 2725, 12590, 11, 80, 19445, 86, 30, 1899, 4278, 701, 12, 7039, 2934, 2079, 2932, 10, 438, 538, 3113, 1408, 13, 6792, 468, 454, 328, 19445, 86, 2282, 2342, 16, 6508, 326, 3089, 21192, 18, 2342, 18, 2725, 12590, 11, 80, 19445, 86, 30, 8766, 1888, 11, 2497, 10923, 1888, 11, 6792, 468, 4479, 326, 328, 19445, 86, 30, 1633, 1347, 326, 589, 711, 2118, 10725, 329, 18, 2342, 18, 2725, 12590, 11, 70, 335, 3409, 11, 2497, 9707, 11, 6792, 468, 70, 335, 93, 9558, 854, 2935, 603, 777, 721, 17318, 225, 468, 1289, 1835, 309, 518, 1807, 486, 3634, 309, 3422, 3292, 38, 862, 23513, 3546, 480, 296, 225, 374, 18, 713, 4278, 2342, 273, 13666, 2819, 4278, 7039, 3292, 38, 862, 23513, 29489, 80, 6406, 17767, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4204, 2498, 12, 7039, 4672, 309, 486, 3422, 30, 327, 225, 2342, 273, 2618, 225, 468, 4156, 603, 777, 2953, 2342, 18, 2725, 12590, 11, 3168, 11, 2497, 80, 19445, 86, 2187, 296, 3168, 30, 712, 11, 2497, 6734, 20, 17, 5908, 17, 4033, 11, 6792, 2342, 18, 2725, 12590, 11, 80, 19445, 86, 30, 1899, 4278, 701, 12, 7039, 2934, 2079, 2932, 10, 438, 538, 3113, 1408, 13, 6792, 468, 454, 328, 19445, 86, 2282, 2342, 16, 6508, 326, 3089, 21192, 18, 2342, 18, 2725, 12590, 11, 80, 19445, 86, 30, 8766, 1888, 11, 2497, 10923, 1888, 11, 6792, 468, 4479, 326, 328, 19445, 86, 30, 1633, 1347, 326, 589, 711, 2118, 10725, 329, 18, 2342, 18, 2 ]
if profilers.present(): profilers.start(self) utils.system(vars + ' ./Run ' + args) profilers.stop(self) profilers.report(self)
os.chdir(self.srcdir) utils.system(vars + ' ./Run ' + args)
def execute(self, iterations = 1, args = '', stepsecs=0): vars = ('TMPDIR=\"%s\" RESULTDIR=\"%s\"' % (self.tmpdir, self.resultsdir)) profilers = self.job.profilers keyval = open(self.resultsdir + '/keyval', 'w') self.err = None if stepsecs: # change time per subtest from unixbench's defaults of # 10 secs for small tests, 30 secs for bigger tests vars += ' systime=%i looper=%i seconds=%i'\ ' dhrytime=%i arithtime=%i' \ % ((stepsecs,)*5) if not profilers.only(): for i in range(iterations): os.chdir(self.srcdir) utils.system(vars + ' ./Run ' + args) report = open(self.resultsdir + '/report') self.format_results(report, keyval)
62a055909f5c82daab963911315bcafcd04f78d8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10349/62a055909f5c82daab963911315bcafcd04f78d8/unixbench.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 11316, 273, 404, 16, 833, 273, 10226, 2235, 21317, 33, 20, 4672, 4153, 273, 7707, 28259, 4537, 5189, 9, 87, 2412, 17210, 4537, 5189, 9, 87, 2412, 11, 738, 261, 2890, 18, 5645, 1214, 16, 365, 18, 4717, 1214, 3719, 450, 7540, 414, 273, 365, 18, 4688, 18, 685, 7540, 414, 498, 1125, 273, 1696, 12, 2890, 18, 4717, 1214, 397, 1173, 856, 1125, 2187, 296, 91, 6134, 365, 18, 370, 273, 599, 309, 2235, 21317, 30, 468, 2549, 813, 1534, 720, 3813, 628, 9753, 22144, 1807, 3467, 434, 468, 282, 1728, 18043, 364, 5264, 7434, 16, 5196, 18043, 364, 18983, 7434, 4153, 1011, 296, 272, 1094, 494, 5095, 77, 437, 4063, 5095, 77, 3974, 5095, 77, 8314, 296, 11007, 1176, 957, 5095, 77, 419, 483, 957, 5095, 77, 11, 521, 738, 14015, 4119, 21317, 16, 17653, 25, 13, 309, 486, 450, 7540, 414, 18, 3700, 13332, 364, 277, 316, 1048, 12, 19330, 4672, 1140, 18, 343, 1214, 12, 2890, 18, 4816, 1214, 13, 2990, 18, 4299, 12, 4699, 397, 296, 263, 19, 1997, 296, 397, 833, 13, 2605, 273, 1696, 12, 2890, 18, 4717, 1214, 397, 1173, 6006, 6134, 365, 18, 2139, 67, 4717, 12, 6006, 16, 498, 1125, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 11316, 273, 404, 16, 833, 273, 10226, 2235, 21317, 33, 20, 4672, 4153, 273, 7707, 28259, 4537, 5189, 9, 87, 2412, 17210, 4537, 5189, 9, 87, 2412, 11, 738, 261, 2890, 18, 5645, 1214, 16, 365, 18, 4717, 1214, 3719, 450, 7540, 414, 273, 365, 18, 4688, 18, 685, 7540, 414, 498, 1125, 273, 1696, 12, 2890, 18, 4717, 1214, 397, 1173, 856, 1125, 2187, 296, 91, 6134, 365, 18, 370, 273, 599, 309, 2235, 21317, 30, 468, 2549, 813, 1534, 720, 3813, 628, 9753, 22144, 1807, 3467, 434, 468, 282, 1728, 18043, 364, 5264, 7434, 16, 5196, 18043, 364, 18983, 7434, 4153, 1011, 296, 272, 1094, 494, 5095, 77, 437, 4063, 5095, 77, 2 ]
class ContinuousChar(GeneratedsSuper):
class AbstractMapping(Base): """The AbstractMapping type is the superclass for an ambiguity mapping. In an instance document, a subclass of this type will look like <member state="st1"/>, i.e. an element called "member" with an attribute called "state" whose value is an id reference that refers to an element that subclasses AbstractState. The purpose of AbstractMapping is to specify which other states may be implied, e.g. a nucleotide symbol "N" would have mappings to "A", "C", "G" and "T".""" subclass = None superclass = Base def __init__(self, state=None, valueOf_=None, mixedclass_=None, content_=None): super(AbstractMapping, self).__init__(valueOf_, mixedclass_, content_, ) self.state = _cast(None, state) self.valueOf_ = valueOf_ if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if AbstractMapping.subclass: return AbstractMapping.subclass(*args_, **kwargs_) else: return AbstractMapping(*args_, **kwargs_) factory = staticmethod(factory) def get_state(self): return self.state def set_state(self, state): self.state = state def get_valueOf_(self): return self.valueOf_ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='AbstractMapping', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='AbstractMapping') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') outfile.write(' xsi:type="AbstractMapping"') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('</%s%s>\n' % (namespace_, name_)) def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='AbstractMapping'): super(AbstractMapping, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractMapping') outfile.write(' state=%s' % (self.gds_format_string(quote_attrib(self.state).encode(ExternalEncoding), input_name='state'), )) def exportChildren(self, outfile, level, namespace_='', name_='AbstractMapping'): super(AbstractMapping, self).exportChildren(outfile, level, namespace_, name_) pass def hasContent_(self): if ( self.valueOf_ or super(AbstractMapping, self).hasContent_() ): return True else: return False def exportLiteral(self, outfile, level, name_='AbstractMapping'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): if self.state is not None: showIndent(outfile, level) outfile.write('state = "%s",\n' % (self.state,)) super(AbstractMapping, self).exportLiteralAttributes(outfile, level, name_) def exportLiteralChildren(self, outfile, level, name_): super(AbstractMapping, self).exportLiteralChildren(outfile, level, name_) showIndent(outfile, level) outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,)) def build(self, node): self.buildAttributes(node, node.attrib, []) self.valueOf_ = get_all_text_(node) if node.text is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', node.text) self.content_.append(obj_) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): value = attrs.get('state') if value is not None and 'state' not in already_processed: already_processed.append('state') self.state = value super(AbstractMapping, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if not from_subclass and child_.tail is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.tail) self.content_.append(obj_) super(AbstractMapping, self).buildChildren(child_, nodeName_, True) pass class DNAMapping(AbstractMapping): """An IUPAC ambiguity mapping.""" subclass = None superclass = AbstractMapping def __init__(self, state=None, valueOf_=None): super(DNAMapping, self).__init__(state, valueOf_, ) self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if DNAMapping.subclass: return DNAMapping.subclass(*args_, **kwargs_) else: return DNAMapping(*args_, **kwargs_) factory = staticmethod(factory) def get_valueOf_(self): return self.valueOf_ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='DNAMapping', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='DNAMapping') if self.hasContent_(): outfile.write('>') outfile.write(self.valueOf_) self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='DNAMapping'): super(DNAMapping, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DNAMapping') def exportChildren(self, outfile, level, namespace_='', name_='DNAMapping'): pass def hasContent_(self): if ( self.valueOf_ ): return True else: return False def exportLiteral(self, outfile, level, name_='DNAMapping'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,)) def build(self, node): self.buildAttributes(node, node.attrib, []) self.valueOf_ = get_all_text_(node) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): super(DNAMapping, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): pass class AAMapping(AbstractMapping): """An IUPAC ambiguity mapping.""" subclass = None superclass = AbstractMapping def __init__(self, state=None, valueOf_=None): super(AAMapping, self).__init__(state, valueOf_, ) self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if AAMapping.subclass: return AAMapping.subclass(*args_, **kwargs_) else: return AAMapping(*args_, **kwargs_) factory = staticmethod(factory) def get_valueOf_(self): return self.valueOf_ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='AAMapping', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='AAMapping') if self.hasContent_(): outfile.write('>') outfile.write(self.valueOf_) self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='AAMapping'): super(AAMapping, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AAMapping') def exportChildren(self, outfile, level, namespace_='', name_='AAMapping'): pass def hasContent_(self): if ( self.valueOf_ ): return True else: return False def exportLiteral(self, outfile, level, name_='AAMapping'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,)) def build(self, node): self.buildAttributes(node, node.attrib, []) self.valueOf_ = get_all_text_(node) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): super(AAMapping, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): pass class RNAMapping(AbstractMapping): """An IUPAC RNA ambiguity mapping.""" subclass = None superclass = AbstractMapping def __init__(self, state=None, valueOf_=None): super(RNAMapping, self).__init__(state, valueOf_, ) self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if RNAMapping.subclass: return RNAMapping.subclass(*args_, **kwargs_) else: return RNAMapping(*args_, **kwargs_) factory = staticmethod(factory) def get_valueOf_(self): return self.valueOf_ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='RNAMapping', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='RNAMapping') if self.hasContent_(): outfile.write('>') outfile.write(self.valueOf_) self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='RNAMapping'): super(RNAMapping, self).exportAttributes(outfile, level, already_processed, namespace_, name_='RNAMapping') def exportChildren(self, outfile, level, namespace_='', name_='RNAMapping'): pass def hasContent_(self): if ( self.valueOf_ ): return True else: return False def exportLiteral(self, outfile, level, name_='RNAMapping'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,)) def build(self, node): self.buildAttributes(node, node.attrib, []) self.valueOf_ = get_all_text_(node) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): super(RNAMapping, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): pass class StandardMapping(AbstractMapping): """A standard character ambiguity mapping.""" subclass = None superclass = AbstractMapping def __init__(self, state=None, valueOf_=None): super(StandardMapping, self).__init__(state, valueOf_, ) self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if StandardMapping.subclass: return StandardMapping.subclass(*args_, **kwargs_) else: return StandardMapping(*args_, **kwargs_) factory = staticmethod(factory) def get_valueOf_(self): return self.valueOf_ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='StandardMapping', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='StandardMapping') if self.hasContent_(): outfile.write('>') outfile.write(self.valueOf_) self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='StandardMapping'): super(StandardMapping, self).exportAttributes(outfile, level, already_processed, namespace_, name_='StandardMapping') def exportChildren(self, outfile, level, namespace_='', name_='StandardMapping'): pass def hasContent_(self): if ( self.valueOf_ ): return True else: return False def exportLiteral(self, outfile, level, name_='StandardMapping'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,)) def build(self, node): self.buildAttributes(node, node.attrib, []) self.valueOf_ = get_all_text_(node) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): super(StandardMapping, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): pass class Annotated(Base): """The Annotated complexType is a super class for objects that optionally have metadata annotations of type Meta.""" subclass = None superclass = Base def __init__(self, about=None, meta=None, valueOf_=None, mixedclass_=None, content_=None): super(Annotated, self).__init__(valueOf_, mixedclass_, content_, ) self.about = _cast(None, about) if meta is None: self.meta = [] else: self.meta = meta self.valueOf_ = valueOf_ if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if Annotated.subclass: return Annotated.subclass(*args_, **kwargs_) else: return Annotated(*args_, **kwargs_) factory = staticmethod(factory) def get_meta(self): return self.meta def set_meta(self, meta): self.meta = meta def add_meta(self, value): self.meta.append(value) def insert_meta(self, index, value): self.meta[index] = value def get_about(self): return self.about def set_about(self, about): self.about = about def get_valueOf_(self): return self.valueOf_ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='Annotated', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='Annotated') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') outfile.write(' xsi:type="Annotated"') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='Annotated'): super(Annotated, self).exportAttributes(outfile, level, already_processed, namespace_, name_='Annotated') if self.about is not None and 'about' not in already_processed: already_processed.append('about') outfile.write(' about=%s' % (quote_attrib(self.about), )) def exportChildren(self, outfile, level, namespace_='', name_='Annotated'): super(Annotated, self).exportChildren(outfile, level, namespace_, name_) for item_ in self.content_: item_.export(outfile, level, item_.name, namespace_) def hasContent_(self): if ( self.meta or self.valueOf_ or super(Annotated, self).hasContent_() ): return True else: return False def exportLiteral(self, outfile, level, name_='Annotated'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): if self.about is not None: showIndent(outfile, level) outfile.write('about = %s,\n' % (self.about,)) super(Annotated, self).exportLiteralAttributes(outfile, level, name_) def exportLiteralChildren(self, outfile, level, name_): super(Annotated, self).exportLiteralChildren(outfile, level, name_) showIndent(outfile, level) outfile.write('content_ = [\n') for item_ in self.content_: item_.exportLiteral(outfile, level, name_) showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,)) def build(self, node): self.buildAttributes(node, node.attrib, []) self.valueOf_ = get_all_text_(node) if node.text is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', node.text) self.content_.append(obj_) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): value = attrs.get('about') if value is not None and 'about' not in already_processed: already_processed.append('about') self.about = value super(Annotated, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'meta': type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type') if type_name_ is None: type_name_ = child_.attrib.get('type') if type_name_ is not None: type_names_ = type_name_.split(':') if len(type_names_) == 1: type_name_ = type_names_[0] else: type_name_ = type_names_[1] class_ = globals()[type_name_] obj_ = class_.factory() obj_.build(child_) else: raise NotImplementedError( 'Class not implemented for <meta> element') obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'meta', obj_) self.content_.append(obj_) if hasattr(self, 'add_meta'): self.add_meta(obj_.value) elif hasattr(self, 'set_meta'): self.set_meta(obj_.value) if not from_subclass and child_.tail is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.tail) self.content_.append(obj_) super(Annotated, self).buildChildren(child_, nodeName_, True) class Nexml(Annotated): """The root element for nexml.""" subclass = None superclass = Annotated def __init__(self, about=None, meta=None, version=None, generator=None, otus=None, characters=None, trees=None): super(Nexml, self).__init__(about, meta, ) self.version = _cast(None, version) self.generator = _cast(None, generator) if otus is None: self.otus = [] else: self.otus = otus if characters is None: self.characters = [] else: self.characters = characters if trees is None: self.trees = [] else: self.trees = trees def factory(*args_, **kwargs_): if Nexml.subclass: return Nexml.subclass(*args_, **kwargs_) else: return Nexml(*args_, **kwargs_) factory = staticmethod(factory) def get_otus(self): return self.otus def set_otus(self, otus): self.otus = otus def add_otus(self, value): self.otus.append(value) def insert_otus(self, index, value): self.otus[index] = value def get_characters(self): return self.characters def set_characters(self, characters): self.characters = characters def add_characters(self, value): self.characters.append(value) def insert_characters(self, index, value): self.characters[index] = value def get_trees(self): return self.trees def set_trees(self, trees): self.trees = trees def add_trees(self, value): self.trees.append(value) def insert_trees(self, index, value): self.trees[index] = value def get_version(self): return self.version def set_version(self, version): self.version = version def validate_Nexml1_0(self, value): pass def get_generator(self): return self.generator def set_generator(self, generator): self.generator = generator def export(self, outfile, level, namespace_='', name_='Nexml', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='Nexml') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') outfile.write(' xsi:type="Nexml"') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='Nexml'): super(Nexml, self).exportAttributes(outfile, level, already_processed, namespace_, name_='Nexml') outfile.write(' version=%s' % (quote_attrib(self.version), )) if self.generator is not None and 'generator' not in already_processed: already_processed.append('generator') outfile.write(' generator=%s' % (self.gds_format_string(quote_attrib(self.generator).encode(ExternalEncoding), input_name='generator'), )) def exportChildren(self, outfile, level, namespace_='', name_='Nexml'): super(Nexml, self).exportChildren(outfile, level, namespace_, name_) for otus_ in self.otus: otus_.export(outfile, level, namespace_, name_='otus') for characters_ in self.get_characters(): characters_.export(outfile, level, namespace_, name_='characters') for trees_ in self.trees: trees_.export(outfile, level, namespace_, name_='trees') def hasContent_(self): if ( self.otus or self.characters or self.trees or super(Nexml, self).hasContent_() ): return True else: return False def exportLiteral(self, outfile, level, name_='Nexml'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): if self.version is not None: showIndent(outfile, level) outfile.write('version = %f,\n' % (self.version,)) if self.generator is not None: showIndent(outfile, level) outfile.write('generator = "%s",\n' % (self.generator,)) super(Nexml, self).exportLiteralAttributes(outfile, level, name_) def exportLiteralChildren(self, outfile, level, name_): super(Nexml, self).exportLiteralChildren(outfile, level, name_) showIndent(outfile, level) outfile.write('otus=[\n') level += 1 for otus_ in self.otus: showIndent(outfile, level) outfile.write('model_.Taxa(\n') otus_.exportLiteral(outfile, level, name_='Taxa') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('characters=[\n') level += 1 for characters_ in self.characters: showIndent(outfile, level) outfile.write('model_.AbstractBlock(\n') characters_.exportLiteral(outfile, level, name_='AbstractBlock') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('trees=[\n') level += 1 for trees_ in self.trees: showIndent(outfile, level) outfile.write('model_.Trees(\n') trees_.exportLiteral(outfile, level, name_='Trees') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node): self.buildAttributes(node, node.attrib, []) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): value = attrs.get('version') if value is not None and 'version' not in already_processed: already_processed.append('version') self.version = value self.validate_Nexml1_0(self.version) value = attrs.get('generator') if value is not None and 'generator' not in already_processed: already_processed.append('generator') self.generator = value super(Nexml, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'otus': obj_ = Taxa.factory() obj_.build(child_) self.otus.append(obj_) elif nodeName_ == 'characters': type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type') if type_name_ is None: type_name_ = child_.attrib.get('type') if type_name_ is not None: type_names_ = type_name_.split(':') if len(type_names_) == 1: type_name_ = type_names_[0] else: type_name_ = type_names_[1] class_ = globals()[type_name_] obj_ = class_.factory() obj_.build(child_) else: raise NotImplementedError( 'Class not implemented for <characters> element') self.characters.append(obj_) elif nodeName_ == 'trees': obj_ = Trees.factory() obj_.build(child_) self.trees.append(obj_) super(Nexml, self).buildChildren(child_, nodeName_, True) class AbstractObsMatrix(Annotated): """The AbstractObsMatrix super class is the abstract type for a <matrix> element that contains rows which hold granular state observations.""" subclass = None superclass = Annotated def __init__(self, about=None, meta=None, row=None, set=None, valueOf_=None, mixedclass_=None, content_=None): super(AbstractObsMatrix, self).__init__(about, meta, valueOf_, mixedclass_, content_, ) if row is None: self.row = [] else: self.row = row if set is None: self.set = [] else: self.set = set self.valueOf_ = valueOf_ if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if AbstractObsMatrix.subclass: return AbstractObsMatrix.subclass(*args_, **kwargs_) else: return AbstractObsMatrix(*args_, **kwargs_) factory = staticmethod(factory) def get_row(self): return self.row def set_row(self, row): self.row = row def add_row(self, value): self.row.append(value) def insert_row(self, index, value): self.row[index] = value def get_set(self): return self.set def set_set(self, set): self.set = set def add_set(self, value): self.set.append(value) def insert_set(self, index, value): self.set[index] = value def get_valueOf_(self): return self.valueOf_ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='AbstractObsMatrix', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='AbstractObsMatrix') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') outfile.write(' xsi:type="AbstractObsMatrix"') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='AbstractObsMatrix'): super(AbstractObsMatrix, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractObsMatrix') def exportChildren(self, outfile, level, namespace_='', name_='AbstractObsMatrix'): super(AbstractObsMatrix, self).exportChildren(outfile, level, namespace_, name_) for item_ in self.content_: item_.export(outfile, level, item_.name, namespace_) def hasContent_(self): if ( self.row or self.set or self.valueOf_ or super(AbstractObsMatrix, self).hasContent_() ): return True else: return False def exportLiteral(self, outfile, level, name_='AbstractObsMatrix'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): super(AbstractObsMatrix, self).exportLiteralAttributes(outfile, level, name_) def exportLiteralChildren(self, outfile, level, name_): super(AbstractObsMatrix, self).exportLiteralChildren(outfile, level, name_) showIndent(outfile, level) outfile.write('content_ = [\n') for item_ in self.content_: item_.exportLiteral(outfile, level, name_) showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('content_ = [\n') for item_ in self.content_: item_.exportLiteral(outfile, level, name_) showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,)) def build(self, node): self.buildAttributes(node, node.attrib, []) self.valueOf_ = get_all_text_(node) if node.text is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', node.text) self.content_.append(obj_) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): super(AbstractObsMatrix, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'row': type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type') if type_name_ is None: type_name_ = child_.attrib.get('type') if type_name_ is not None: type_names_ = type_name_.split(':') if len(type_names_) == 1: type_name_ = type_names_[0] else: type_name_ = type_names_[1] class_ = globals()[type_name_] obj_ = class_.factory() obj_.build(child_) else: raise NotImplementedError( 'Class not implemented for <row> element') obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'row', obj_) self.content_.append(obj_) if hasattr(self, 'add_row'): self.add_row(obj_.value) elif hasattr(self, 'set_row'): self.set_row(obj_.value) elif nodeName_ == 'set': obj_ = RowSet.factory() obj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'set', obj_) self.content_.append(obj_) if hasattr(self, 'add_set'): self.add_set(obj_.value) elif hasattr(self, 'set_set'): self.set_set(obj_.value) if not from_subclass and child_.tail is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.tail) self.content_.append(obj_) super(AbstractObsMatrix, self).buildChildren(child_, nodeName_, True) class AbstractSeqMatrix(Annotated): """The AbstractSeqMatrix super class is the abstract type for a <matrix> element that contains rows which hold raw character sequences.""" subclass = None superclass = Annotated def __init__(self, about=None, meta=None, row=None, set=None, valueOf_=None, mixedclass_=None, content_=None): super(AbstractSeqMatrix, self).__init__(about, meta, valueOf_, mixedclass_, content_, ) if row is None: self.row = [] else: self.row = row if set is None: self.set = [] else: self.set = set self.valueOf_ = valueOf_ if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if AbstractSeqMatrix.subclass: return AbstractSeqMatrix.subclass(*args_, **kwargs_) else: return AbstractSeqMatrix(*args_, **kwargs_) factory = staticmethod(factory) def get_row(self): return self.row def set_row(self, row): self.row = row def add_row(self, value): self.row.append(value) def insert_row(self, index, value): self.row[index] = value def get_set(self): return self.set def set_set(self, set): self.set = set def add_set(self, value): self.set.append(value) def insert_set(self, index, value): self.set[index] = value def get_valueOf_(self): return self.valueOf_ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='AbstractSeqMatrix', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='AbstractSeqMatrix') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') outfile.write(' xsi:type="AbstractSeqMatrix"') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='AbstractSeqMatrix'): super(AbstractSeqMatrix, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractSeqMatrix') def exportChildren(self, outfile, level, namespace_='', name_='AbstractSeqMatrix'): super(AbstractSeqMatrix, self).exportChildren(outfile, level, namespace_, name_) for item_ in self.content_: item_.export(outfile, level, item_.name, namespace_) def hasContent_(self): if ( self.row or self.set or self.valueOf_ or super(AbstractSeqMatrix, self).hasContent_() ): return True else: return False def exportLiteral(self, outfile, level, name_='AbstractSeqMatrix'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): super(AbstractSeqMatrix, self).exportLiteralAttributes(outfile, level, name_) def exportLiteralChildren(self, outfile, level, name_): super(AbstractSeqMatrix, self).exportLiteralChildren(outfile, level, name_) showIndent(outfile, level) outfile.write('content_ = [\n') for item_ in self.content_: item_.exportLiteral(outfile, level, name_) showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('content_ = [\n') for item_ in self.content_: item_.exportLiteral(outfile, level, name_) showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,)) def build(self, node): self.buildAttributes(node, node.attrib, []) self.valueOf_ = get_all_text_(node) if node.text is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', node.text) self.content_.append(obj_) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): super(AbstractSeqMatrix, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'row': type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type') if type_name_ is None: type_name_ = child_.attrib.get('type') if type_name_ is not None: type_names_ = type_name_.split(':') if len(type_names_) == 1: type_name_ = type_names_[0] else: type_name_ = type_names_[1] class_ = globals()[type_name_] obj_ = class_.factory() obj_.build(child_) else: raise NotImplementedError( 'Class not implemented for <row> element') obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'row', obj_) self.content_.append(obj_) if hasattr(self, 'add_row'): self.add_row(obj_.value) elif hasattr(self, 'set_row'): self.set_row(obj_.value) elif nodeName_ == 'set': obj_ = RowSet.factory() obj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'set', obj_) self.content_.append(obj_) if hasattr(self, 'add_set'): self.add_set(obj_.value) elif hasattr(self, 'set_set'): self.set_set(obj_.value) if not from_subclass and child_.tail is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.tail) self.content_.append(obj_) super(AbstractSeqMatrix, self).buildChildren(child_, nodeName_, True) class AbstractFormat(Annotated): """The AbstractFormat type is the superclass for the element that defines the allowed characters and states in a matrix, and their ambiguity mapping. It may enclose AbstractStates elements that define states and their mappings, and AbstractChar elements that specify which AbstractStates apply to which matrix columns.""" subclass = None superclass = Annotated def __init__(self, about=None, meta=None, states=None, char=None, set=None, valueOf_=None, mixedclass_=None, content_=None): super(AbstractFormat, self).__init__(about, meta, valueOf_, mixedclass_, content_, ) if states is None: self.states = [] else: self.states = states if char is None: self.char = [] else: self.char = char if set is None: self.set = [] else: self.set = set self.valueOf_ = valueOf_ if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if AbstractFormat.subclass: return AbstractFormat.subclass(*args_, **kwargs_) else: return AbstractFormat(*args_, **kwargs_) factory = staticmethod(factory) def get_states(self): return self.states def set_states(self, states): self.states = states def add_states(self, value): self.states.append(value) def insert_states(self, index, value): self.states[index] = value def get_char(self): return self.char def set_char(self, char): self.char = char def add_char(self, value): self.char.append(value) def insert_char(self, index, value): self.char[index] = value def get_set(self): return self.set def set_set(self, set): self.set = set def add_set(self, value): self.set.append(value) def insert_set(self, index, value): self.set[index] = value def get_valueOf_(self): return self.valueOf_ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='AbstractFormat', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='AbstractFormat') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') outfile.write(' xsi:type="AbstractFormat"') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='AbstractFormat'): super(AbstractFormat, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractFormat') def exportChildren(self, outfile, level, namespace_='', name_='AbstractFormat'): super(AbstractFormat, self).exportChildren(outfile, level, namespace_, name_) for item_ in self.content_: item_.export(outfile, level, item_.name, namespace_) def hasContent_(self): if ( self.states or self.char or self.set or self.valueOf_ or super(AbstractFormat, self).hasContent_() ): return True else: return False def exportLiteral(self, outfile, level, name_='AbstractFormat'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): super(AbstractFormat, self).exportLiteralAttributes(outfile, level, name_) def exportLiteralChildren(self, outfile, level, name_): super(AbstractFormat, self).exportLiteralChildren(outfile, level, name_) showIndent(outfile, level) outfile.write('content_ = [\n') for item_ in self.content_: item_.exportLiteral(outfile, level, name_) showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('content_ = [\n') for item_ in self.content_: item_.exportLiteral(outfile, level, name_) showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('content_ = [\n') for item_ in self.content_: item_.exportLiteral(outfile, level, name_) showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,)) def build(self, node): self.buildAttributes(node, node.attrib, []) self.valueOf_ = get_all_text_(node) if node.text is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', node.text) self.content_.append(obj_) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): super(AbstractFormat, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'states': type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type') if type_name_ is None: type_name_ = child_.attrib.get('type') if type_name_ is not None: type_names_ = type_name_.split(':') if len(type_names_) == 1: type_name_ = type_names_[0] else: type_name_ = type_names_[1] class_ = globals()[type_name_] obj_ = class_.factory() obj_.build(child_) else: raise NotImplementedError( 'Class not implemented for <states> element') obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'states', obj_) self.content_.append(obj_) if hasattr(self, 'add_states'): self.add_states(obj_.value) elif hasattr(self, 'set_states'): self.set_states(obj_.value) elif nodeName_ == 'char': type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type') if type_name_ is None: type_name_ = child_.attrib.get('type') if type_name_ is not None: type_names_ = type_name_.split(':') if len(type_names_) == 1: type_name_ = type_names_[0] else: type_name_ = type_names_[1] class_ = globals()[type_name_] obj_ = class_.factory() obj_.build(child_) else: raise NotImplementedError( 'Class not implemented for <char> element') obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'char', obj_) self.content_.append(obj_) if hasattr(self, 'add_char'): self.add_char(obj_.value) elif hasattr(self, 'set_char'): self.set_char(obj_.value) elif nodeName_ == 'set': obj_ = CharSet.factory() obj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'set', obj_) self.content_.append(obj_) if hasattr(self, 'add_set'): self.add_set(obj_.value) elif hasattr(self, 'set_set'): self.set_set(obj_.value) if not from_subclass and child_.tail is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.tail) self.content_.append(obj_) super(AbstractFormat, self).buildChildren(child_, nodeName_, True) class ContinuousObsMatrix(AbstractObsMatrix): """A matrix of rows with single character observations.""" subclass = None superclass = AbstractObsMatrix def __init__(self, about=None, meta=None, row=None, set=None): super(ContinuousObsMatrix, self).__init__(about, meta, row, set, ) if row is None: self.row = [] else: self.row = row if set is None: self.set = [] else: self.set = set def factory(*args_, **kwargs_): if ContinuousObsMatrix.subclass: return ContinuousObsMatrix.subclass(*args_, **kwargs_) else: return ContinuousObsMatrix(*args_, **kwargs_) factory = staticmethod(factory) def get_row(self): return self.row def set_row(self, row): self.row = row def add_row(self, value): self.row.append(value) def insert_row(self, index, value): self.row[index] = value def get_set(self): return self.set def set_set(self, set): self.set = set def add_set(self, value): self.set.append(value) def insert_set(self, index, value): self.set[index] = value def export(self, outfile, level, namespace_='', name_='ContinuousObsMatrix', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='ContinuousObsMatrix') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='ContinuousObsMatrix'): super(ContinuousObsMatrix, self).exportAttributes(outfile, level, already_processed, namespace_, name_='ContinuousObsMatrix') def exportChildren(self, outfile, level, namespace_='', name_='ContinuousObsMatrix'): for row_ in self.row: row_.export(outfile, level, namespace_, name_='row') for set_ in self.set: set_.export(outfile, level, namespace_, name_='set') def hasContent_(self): if ( self.row or self.set ): return True else: return False def exportLiteral(self, outfile, level, name_='ContinuousObsMatrix'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('row=[\n') level += 1 for row_ in self.row: showIndent(outfile, level) outfile.write('model_.ContinuousMatrixObsRow(\n') row_.exportLiteral(outfile, level, name_='ContinuousMatrixObsRow') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('set=[\n') level += 1 for set_ in self.set: showIndent(outfile, level) outfile.write('model_.RowSet(\n') set_.exportLiteral(outfile, level, name_='RowSet') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node): self.buildAttributes(node, node.attrib, []) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): super(ContinuousObsMatrix, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'row': obj_ = ContinuousMatrixObsRow.factory() obj_.build(child_) self.row.append(obj_) elif nodeName_ == 'set': obj_ = RowSet.factory() obj_.build(child_) self.set.append(obj_) class ContinuousSeqMatrix(AbstractSeqMatrix): """A matrix of rows with seq strings of type continuous.""" subclass = None superclass = AbstractSeqMatrix def __init__(self, about=None, meta=None, row=None, set=None): super(ContinuousSeqMatrix, self).__init__(about, meta, row, set, ) if row is None: self.row = [] else: self.row = row if set is None: self.set = [] else: self.set = set def factory(*args_, **kwargs_): if ContinuousSeqMatrix.subclass: return ContinuousSeqMatrix.subclass(*args_, **kwargs_) else: return ContinuousSeqMatrix(*args_, **kwargs_) factory = staticmethod(factory) def get_row(self): return self.row def set_row(self, row): self.row = row def add_row(self, value): self.row.append(value) def insert_row(self, index, value): self.row[index] = value def get_set(self): return self.set def set_set(self, set): self.set = set def add_set(self, value): self.set.append(value) def insert_set(self, index, value): self.set[index] = value def export(self, outfile, level, namespace_='', name_='ContinuousSeqMatrix', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='ContinuousSeqMatrix') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='ContinuousSeqMatrix'): super(ContinuousSeqMatrix, self).exportAttributes(outfile, level, already_processed, namespace_, name_='ContinuousSeqMatrix') def exportChildren(self, outfile, level, namespace_='', name_='ContinuousSeqMatrix'): for row_ in self.row: row_.export(outfile, level, namespace_, name_='row') for set_ in self.set: set_.export(outfile, level, namespace_, name_='set') def hasContent_(self): if ( self.row or self.set ): return True else: return False def exportLiteral(self, outfile, level, name_='ContinuousSeqMatrix'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('row=[\n') level += 1 for row_ in self.row: showIndent(outfile, level) outfile.write('model_.ContinuousMatrixSeqRow(\n') row_.exportLiteral(outfile, level, name_='ContinuousMatrixSeqRow') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('set=[\n') level += 1 for set_ in self.set: showIndent(outfile, level) outfile.write('model_.RowSet(\n') set_.exportLiteral(outfile, level, name_='RowSet') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node): self.buildAttributes(node, node.attrib, []) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): super(ContinuousSeqMatrix, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'row': obj_ = ContinuousMatrixSeqRow.factory() obj_.build(child_) self.row.append(obj_) elif nodeName_ == 'set': obj_ = RowSet.factory() obj_.build(child_) self.set.append(obj_) class ContinuousFormat(AbstractFormat): """The ContinuousFormat class is the container of continuous column definitions.""" subclass = None superclass = AbstractFormat def __init__(self, about=None, meta=None, states=None, char=None, set=None): super(ContinuousFormat, self).__init__(about, meta, states, char, set, ) if char is None: self.char = [] else: self.char = char if set is None: self.set = [] else: self.set = set def factory(*args_, **kwargs_): if ContinuousFormat.subclass: return ContinuousFormat.subclass(*args_, **kwargs_) else: return ContinuousFormat(*args_, **kwargs_) factory = staticmethod(factory) def get_char(self): return self.char def set_char(self, char): self.char = char def add_char(self, value): self.char.append(value) def insert_char(self, index, value): self.char[index] = value def get_set(self): return self.set def set_set(self, set): self.set = set def add_set(self, value): self.set.append(value) def insert_set(self, index, value): self.set[index] = value def export(self, outfile, level, namespace_='', name_='ContinuousFormat', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='ContinuousFormat') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='ContinuousFormat'): super(ContinuousFormat, self).exportAttributes(outfile, level, already_processed, namespace_, name_='ContinuousFormat') def exportChildren(self, outfile, level, namespace_='', name_='ContinuousFormat'): for char_ in self.char: char_.export(outfile, level, namespace_, name_='char') for set_ in self.set: set_.export(outfile, level, namespace_, name_='set') def hasContent_(self): if ( self.char or self.set ): return True else: return False def exportLiteral(self, outfile, level, name_='ContinuousFormat'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('char=[\n') level += 1 for char_ in self.char: showIndent(outfile, level) outfile.write('model_.ContinuousChar(\n') char_.exportLiteral(outfile, level, name_='ContinuousChar') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('set=[\n') level += 1 for set_ in self.set: showIndent(outfile, level) outfile.write('model_.CharSet(\n') set_.exportLiteral(outfile, level, name_='CharSet') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node): self.buildAttributes(node, node.attrib, []) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): super(ContinuousFormat, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'char': obj_ = ContinuousChar.factory() obj_.build(child_) self.char.append(obj_) elif nodeName_ == 'set': obj_ = CharSet.factory() obj_.build(child_) self.set.append(obj_) class Labelled(Annotated): """The Labelled complexType is a super class for objects that optionally have label attributes to use as a (non-unique) name of type xs:string.""" subclass = None superclass = Annotated def __init__(self, about=None, meta=None, label=None, valueOf_=None, mixedclass_=None, content_=None): super(Labelled, self).__init__(about, meta, valueOf_, mixedclass_, content_, ) self.label = _cast(None, label) self.valueOf_ = valueOf_ if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if Labelled.subclass: return Labelled.subclass(*args_, **kwargs_) else: return Labelled(*args_, **kwargs_) factory = staticmethod(factory) def get_label(self): return self.label def set_label(self, label): self.label = label def get_valueOf_(self): return self.valueOf_ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='Labelled', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='Labelled') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') outfile.write(' xsi:type="Labelled"') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='Labelled'): super(Labelled, self).exportAttributes(outfile, level, already_processed, namespace_, name_='Labelled') if self.label is not None and 'label' not in already_processed: already_processed.append('label') outfile.write(' label=%s' % (self.gds_format_string(quote_attrib(self.label).encode(ExternalEncoding), input_name='label'), )) def exportChildren(self, outfile, level, namespace_='', name_='Labelled'): super(Labelled, self).exportChildren(outfile, level, namespace_, name_) def hasContent_(self): if ( self.valueOf_ or super(Labelled, self).hasContent_() ): return True else: return False def exportLiteral(self, outfile, level, name_='Labelled'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): if self.label is not None: showIndent(outfile, level) outfile.write('label = "%s",\n' % (self.label,)) super(Labelled, self).exportLiteralAttributes(outfile, level, name_) def exportLiteralChildren(self, outfile, level, name_): super(Labelled, self).exportLiteralChildren(outfile, level, name_) showIndent(outfile, level) outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,)) def build(self, node): self.buildAttributes(node, node.attrib, []) self.valueOf_ = get_all_text_(node) if node.text is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', node.text) self.content_.append(obj_) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): value = attrs.get('label') if value is not None and 'label' not in already_processed: already_processed.append('label') self.label = value super(Labelled, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if not from_subclass and child_.tail is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.tail) self.content_.append(obj_) super(Labelled, self).buildChildren(child_, nodeName_, True) pass class StandardObsMatrix(AbstractObsMatrix): """A matrix of rows with single character observations.""" subclass = None superclass = AbstractObsMatrix def __init__(self, about=None, meta=None, row=None, set=None): super(StandardObsMatrix, self).__init__(about, meta, row, set, ) if row is None: self.row = [] else: self.row = row if set is None: self.set = [] else: self.set = set def factory(*args_, **kwargs_): if StandardObsMatrix.subclass: return StandardObsMatrix.subclass(*args_, **kwargs_) else: return StandardObsMatrix(*args_, **kwargs_) factory = staticmethod(factory) def get_row(self): return self.row def set_row(self, row): self.row = row def add_row(self, value): self.row.append(value) def insert_row(self, index, value): self.row[index] = value def get_set(self): return self.set def set_set(self, set): self.set = set def add_set(self, value): self.set.append(value) def insert_set(self, index, value): self.set[index] = value def export(self, outfile, level, namespace_='', name_='StandardObsMatrix', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='StandardObsMatrix') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='StandardObsMatrix'): super(StandardObsMatrix, self).exportAttributes(outfile, level, already_processed, namespace_, name_='StandardObsMatrix') def exportChildren(self, outfile, level, namespace_='', name_='StandardObsMatrix'): for row_ in self.row: row_.export(outfile, level, namespace_, name_='row') for set_ in self.set: set_.export(outfile, level, namespace_, name_='set') def hasContent_(self): if ( self.row or self.set ): return True else: return False def exportLiteral(self, outfile, level, name_='StandardObsMatrix'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('row=[\n') level += 1 for row_ in self.row: showIndent(outfile, level) outfile.write('model_.StandardMatrixObsRow(\n') row_.exportLiteral(outfile, level, name_='StandardMatrixObsRow') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('set=[\n') level += 1 for set_ in self.set: showIndent(outfile, level) outfile.write('model_.RowSet(\n') set_.exportLiteral(outfile, level, name_='RowSet') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node): self.buildAttributes(node, node.attrib, []) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): super(StandardObsMatrix, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'row': obj_ = StandardMatrixObsRow.factory() obj_.build(child_) self.row.append(obj_) elif nodeName_ == 'set': obj_ = RowSet.factory() obj_.build(child_) self.set.append(obj_) class StandardSeqMatrix(AbstractSeqMatrix): """A matrix of rows with seq strings of type standard.""" subclass = None superclass = AbstractSeqMatrix def __init__(self, about=None, meta=None, row=None, set=None): super(StandardSeqMatrix, self).__init__(about, meta, row, set, ) if row is None: self.row = [] else: self.row = row if set is None: self.set = [] else: self.set = set def factory(*args_, **kwargs_): if StandardSeqMatrix.subclass: return StandardSeqMatrix.subclass(*args_, **kwargs_) else: return StandardSeqMatrix(*args_, **kwargs_) factory = staticmethod(factory) def get_row(self): return self.row def set_row(self, row): self.row = row def add_row(self, value): self.row.append(value) def insert_row(self, index, value): self.row[index] = value def get_set(self): return self.set def set_set(self, set): self.set = set def add_set(self, value): self.set.append(value) def insert_set(self, index, value): self.set[index] = value def export(self, outfile, level, namespace_='', name_='StandardSeqMatrix', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='StandardSeqMatrix') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='StandardSeqMatrix'): super(StandardSeqMatrix, self).exportAttributes(outfile, level, already_processed, namespace_, name_='StandardSeqMatrix') def exportChildren(self, outfile, level, namespace_='', name_='StandardSeqMatrix'): for row_ in self.row: row_.export(outfile, level, namespace_, name_='row') for set_ in self.set: set_.export(outfile, level, namespace_, name_='set') def hasContent_(self): if ( self.row or self.set ): return True else: return False def exportLiteral(self, outfile, level, name_='StandardSeqMatrix'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('row=[\n') level += 1 for row_ in self.row: showIndent(outfile, level) outfile.write('model_.StandardMatrixSeqRow(\n') row_.exportLiteral(outfile, level, name_='StandardMatrixSeqRow') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('set=[\n') level += 1 for set_ in self.set: showIndent(outfile, level) outfile.write('model_.RowSet(\n') set_.exportLiteral(outfile, level, name_='RowSet') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node): self.buildAttributes(node, node.attrib, []) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): super(StandardSeqMatrix, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'row': obj_ = StandardMatrixSeqRow.factory() obj_.build(child_) self.row.append(obj_) elif nodeName_ == 'set': obj_ = RowSet.factory() obj_.build(child_) self.set.append(obj_) class StandardFormat(AbstractFormat): """The StandardFormat class is the container of standard column definitions.""" subclass = None superclass = AbstractFormat def __init__(self, about=None, meta=None, states=None, char=None, set=None): super(StandardFormat, self).__init__(about, meta, states, char, set, ) if states is None: self.states = [] else: self.states = states if char is None: self.char = [] else: self.char = char if set is None: self.set = [] else: self.set = set def factory(*args_, **kwargs_): if StandardFormat.subclass: return StandardFormat.subclass(*args_, **kwargs_) else: return StandardFormat(*args_, **kwargs_) factory = staticmethod(factory) def get_states(self): return self.states def set_states(self, states): self.states = states def add_states(self, value): self.states.append(value) def insert_states(self, index, value): self.states[index] = value def get_char(self): return self.char def set_char(self, char): self.char = char def add_char(self, value): self.char.append(value) def insert_char(self, index, value): self.char[index] = value def get_set(self): return self.set def set_set(self, set): self.set = set def add_set(self, value): self.set.append(value) def insert_set(self, index, value): self.set[index] = value def export(self, outfile, level, namespace_='', name_='StandardFormat', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='StandardFormat') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='StandardFormat'): super(StandardFormat, self).exportAttributes(outfile, level, already_processed, namespace_, name_='StandardFormat') def exportChildren(self, outfile, level, namespace_='', name_='StandardFormat'): for states_ in self.states: states_.export(outfile, level, namespace_, name_='states') for char_ in self.char: char_.export(outfile, level, namespace_, name_='char') for set_ in self.set: set_.export(outfile, level, namespace_, name_='set') def hasContent_(self): if ( self.states or self.char or self.set ): return True else: return False def exportLiteral(self, outfile, level, name_='StandardFormat'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('states=[\n') level += 1 for states_ in self.states: showIndent(outfile, level) outfile.write('model_.StandardStates(\n') states_.exportLiteral(outfile, level, name_='StandardStates') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('char=[\n') level += 1 for char_ in self.char: showIndent(outfile, level) outfile.write('model_.StandardChar(\n') char_.exportLiteral(outfile, level, name_='StandardChar') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('set=[\n') level += 1 for set_ in self.set: showIndent(outfile, level) outfile.write('model_.CharSet(\n') set_.exportLiteral(outfile, level, name_='CharSet') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node): self.buildAttributes(node, node.attrib, []) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): super(StandardFormat, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'states': obj_ = StandardStates.factory() obj_.build(child_) self.states.append(obj_) elif nodeName_ == 'char': obj_ = StandardChar.factory() obj_.build(child_) self.char.append(obj_) elif nodeName_ == 'set': obj_ = CharSet.factory() obj_.build(child_) self.set.append(obj_) class RNAObsMatrix(AbstractObsMatrix): """A matrix of rows with single character observations.""" subclass = None superclass = AbstractObsMatrix def __init__(self, about=None, meta=None, row=None, set=None): super(RNAObsMatrix, self).__init__(about, meta, row, set, ) if row is None: self.row = [] else: self.row = row if set is None: self.set = [] else: self.set = set def factory(*args_, **kwargs_): if RNAObsMatrix.subclass: return RNAObsMatrix.subclass(*args_, **kwargs_) else: return RNAObsMatrix(*args_, **kwargs_) factory = staticmethod(factory) def get_row(self): return self.row def set_row(self, row): self.row = row def add_row(self, value): self.row.append(value) def insert_row(self, index, value): self.row[index] = value def get_set(self): return self.set def set_set(self, set): self.set = set def add_set(self, value): self.set.append(value) def insert_set(self, index, value): self.set[index] = value def export(self, outfile, level, namespace_='', name_='RNAObsMatrix', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='RNAObsMatrix') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='RNAObsMatrix'): super(RNAObsMatrix, self).exportAttributes(outfile, level, already_processed, namespace_, name_='RNAObsMatrix') def exportChildren(self, outfile, level, namespace_='', name_='RNAObsMatrix'): for row_ in self.row: row_.export(outfile, level, namespace_, name_='row') for set_ in self.set: set_.export(outfile, level, namespace_, name_='set') def hasContent_(self): if ( self.row or self.set ): return True else: return False def exportLiteral(self, outfile, level, name_='RNAObsMatrix'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('row=[\n') level += 1 for row_ in self.row: showIndent(outfile, level) outfile.write('model_.RNAMatrixObsRow(\n') row_.exportLiteral(outfile, level, name_='RNAMatrixObsRow') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('set=[\n') level += 1 for set_ in self.set: showIndent(outfile, level) outfile.write('model_.RowSet(\n') set_.exportLiteral(outfile, level, name_='RowSet') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node): self.buildAttributes(node, node.attrib, []) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): super(RNAObsMatrix, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'row': obj_ = RNAMatrixObsRow.factory() obj_.build(child_) self.row.append(obj_) elif nodeName_ == 'set': obj_ = RowSet.factory() obj_.build(child_) self.set.append(obj_) class RNASeqMatrix(AbstractSeqMatrix): """A matrix of rows with seq strings of type RNA.""" subclass = None superclass = AbstractSeqMatrix def __init__(self, about=None, meta=None, row=None, set=None): super(RNASeqMatrix, self).__init__(about, meta, row, set, ) if row is None: self.row = [] else: self.row = row if set is None: self.set = [] else: self.set = set def factory(*args_, **kwargs_): if RNASeqMatrix.subclass: return RNASeqMatrix.subclass(*args_, **kwargs_) else: return RNASeqMatrix(*args_, **kwargs_) factory = staticmethod(factory) def get_row(self): return self.row def set_row(self, row): self.row = row def add_row(self, value): self.row.append(value) def insert_row(self, index, value): self.row[index] = value def get_set(self): return self.set def set_set(self, set): self.set = set def add_set(self, value): self.set.append(value) def insert_set(self, index, value): self.set[index] = value def export(self, outfile, level, namespace_='', name_='RNASeqMatrix', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='RNASeqMatrix') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='RNASeqMatrix'): super(RNASeqMatrix, self).exportAttributes(outfile, level, already_processed, namespace_, name_='RNASeqMatrix') def exportChildren(self, outfile, level, namespace_='', name_='RNASeqMatrix'): for row_ in self.row: row_.export(outfile, level, namespace_, name_='row') for set_ in self.set: set_.export(outfile, level, namespace_, name_='set') def hasContent_(self): if ( self.row or self.set ): return True else: return False def exportLiteral(self, outfile, level, name_='RNASeqMatrix'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('row=[\n') level += 1 for row_ in self.row: showIndent(outfile, level) outfile.write('model_.RNAMatrixSeqRow(\n') row_.exportLiteral(outfile, level, name_='RNAMatrixSeqRow') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('set=[\n') level += 1 for set_ in self.set: showIndent(outfile, level) outfile.write('model_.RowSet(\n') set_.exportLiteral(outfile, level, name_='RowSet') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node): self.buildAttributes(node, node.attrib, []) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): super(RNASeqMatrix, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'row': obj_ = RNAMatrixSeqRow.factory() obj_.build(child_) self.row.append(obj_) elif nodeName_ == 'set': obj_ = RowSet.factory() obj_.build(child_) self.set.append(obj_) class RNAFormat(AbstractFormat): """The RNAFormat class is the container of RNA column definitions.""" subclass = None superclass = AbstractFormat def __init__(self, about=None, meta=None, states=None, char=None, set=None): super(RNAFormat, self).__init__(about, meta, states, char, set, ) if states is None: self.states = [] else: self.states = states if char is None: self.char = [] else: self.char = char if set is None: self.set = [] else: self.set = set def factory(*args_, **kwargs_): if RNAFormat.subclass: return RNAFormat.subclass(*args_, **kwargs_) else: return RNAFormat(*args_, **kwargs_) factory = staticmethod(factory) def get_states(self): return self.states def set_states(self, states): self.states = states def add_states(self, value): self.states.append(value) def insert_states(self, index, value): self.states[index] = value def get_char(self): return self.char def set_char(self, char): self.char = char def add_char(self, value): self.char.append(value) def insert_char(self, index, value): self.char[index] = value def get_set(self): return self.set def set_set(self, set): self.set = set def add_set(self, value): self.set.append(value) def insert_set(self, index, value): self.set[index] = value def export(self, outfile, level, namespace_='', name_='RNAFormat', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='RNAFormat') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='RNAFormat'): super(RNAFormat, self).exportAttributes(outfile, level, already_processed, namespace_, name_='RNAFormat') def exportChildren(self, outfile, level, namespace_='', name_='RNAFormat'): for states_ in self.states: states_.export(outfile, level, namespace_, name_='states') for char_ in self.char: char_.export(outfile, level, namespace_, name_='char') for set_ in self.set: set_.export(outfile, level, namespace_, name_='set') def hasContent_(self): if ( self.states or self.char or self.set ): return True else: return False def exportLiteral(self, outfile, level, name_='RNAFormat'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('states=[\n') level += 1 for states_ in self.states: showIndent(outfile, level) outfile.write('model_.RNAStates(\n') states_.exportLiteral(outfile, level, name_='RNAStates') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('char=[\n') level += 1 for char_ in self.char: showIndent(outfile, level) outfile.write('model_.RNAChar(\n') char_.exportLiteral(outfile, level, name_='RNAChar') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('set=[\n') level += 1 for set_ in self.set: showIndent(outfile, level) outfile.write('model_.CharSet(\n') set_.exportLiteral(outfile, level, name_='CharSet') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node): self.buildAttributes(node, node.attrib, []) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): super(RNAFormat, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'states': obj_ = RNAStates.factory() obj_.build(child_) self.states.append(obj_) elif nodeName_ == 'char': obj_ = RNAChar.factory() obj_.build(child_) self.char.append(obj_) elif nodeName_ == 'set': obj_ = CharSet.factory() obj_.build(child_) self.set.append(obj_) class RestrictionObsMatrix(AbstractObsMatrix): """A matrix of rows with single character observations.""" subclass = None superclass = AbstractObsMatrix def __init__(self, about=None, meta=None, row=None, set=None): super(RestrictionObsMatrix, self).__init__(about, meta, row, set, ) if row is None: self.row = [] else: self.row = row if set is None: self.set = [] else: self.set = set def factory(*args_, **kwargs_): if RestrictionObsMatrix.subclass: return RestrictionObsMatrix.subclass(*args_, **kwargs_) else: return RestrictionObsMatrix(*args_, **kwargs_) factory = staticmethod(factory) def get_row(self): return self.row def set_row(self, row): self.row = row def add_row(self, value): self.row.append(value) def insert_row(self, index, value): self.row[index] = value def get_set(self): return self.set def set_set(self, set): self.set = set def add_set(self, value): self.set.append(value) def insert_set(self, index, value): self.set[index] = value def export(self, outfile, level, namespace_='', name_='RestrictionObsMatrix', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='RestrictionObsMatrix') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='RestrictionObsMatrix'): super(RestrictionObsMatrix, self).exportAttributes(outfile, level, already_processed, namespace_, name_='RestrictionObsMatrix') def exportChildren(self, outfile, level, namespace_='', name_='RestrictionObsMatrix'): for row_ in self.row: row_.export(outfile, level, namespace_, name_='row') for set_ in self.set: set_.export(outfile, level, namespace_, name_='set') def hasContent_(self): if ( self.row or self.set ): return True else: return False def exportLiteral(self, outfile, level, name_='RestrictionObsMatrix'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('row=[\n') level += 1 for row_ in self.row: showIndent(outfile, level) outfile.write('model_.RestrictionMatrixObsRow(\n') row_.exportLiteral(outfile, level, name_='RestrictionMatrixObsRow') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('set=[\n') level += 1 for set_ in self.set: showIndent(outfile, level) outfile.write('model_.RowSet(\n') set_.exportLiteral(outfile, level, name_='RowSet') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node): self.buildAttributes(node, node.attrib, []) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): super(RestrictionObsMatrix, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'row': obj_ = RestrictionMatrixObsRow.factory() obj_.build(child_) self.row.append(obj_) elif nodeName_ == 'set': obj_ = RowSet.factory() obj_.build(child_) self.set.append(obj_) class RestrictionSeqMatrix(AbstractSeqMatrix): """A matrix of rows with seq strings of type restriction.""" subclass = None superclass = AbstractSeqMatrix def __init__(self, about=None, meta=None, row=None, set=None): super(RestrictionSeqMatrix, self).__init__(about, meta, row, set, ) if row is None: self.row = [] else: self.row = row if set is None: self.set = [] else: self.set = set def factory(*args_, **kwargs_): if RestrictionSeqMatrix.subclass: return RestrictionSeqMatrix.subclass(*args_, **kwargs_) else: return RestrictionSeqMatrix(*args_, **kwargs_) factory = staticmethod(factory) def get_row(self): return self.row def set_row(self, row): self.row = row def add_row(self, value): self.row.append(value) def insert_row(self, index, value): self.row[index] = value def get_set(self): return self.set def set_set(self, set): self.set = set def add_set(self, value): self.set.append(value) def insert_set(self, index, value): self.set[index] = value def export(self, outfile, level, namespace_='', name_='RestrictionSeqMatrix', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='RestrictionSeqMatrix') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='RestrictionSeqMatrix'): super(RestrictionSeqMatrix, self).exportAttributes(outfile, level, already_processed, namespace_, name_='RestrictionSeqMatrix') def exportChildren(self, outfile, level, namespace_='', name_='RestrictionSeqMatrix'): for row_ in self.row: row_.export(outfile, level, namespace_, name_='row') for set_ in self.set: set_.export(outfile, level, namespace_, name_='set') def hasContent_(self): if ( self.row or self.set ): return True else: return False def exportLiteral(self, outfile, level, name_='RestrictionSeqMatrix'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('row=[\n') level += 1 for row_ in self.row: showIndent(outfile, level) outfile.write('model_.RestrictionMatrixSeqRow(\n') row_.exportLiteral(outfile, level, name_='RestrictionMatrixSeqRow') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('set=[\n') level += 1 for set_ in self.set: showIndent(outfile, level) outfile.write('model_.RowSet(\n') set_.exportLiteral(outfile, level, name_='RowSet') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node): self.buildAttributes(node, node.attrib, []) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): super(RestrictionSeqMatrix, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'row': obj_ = RestrictionMatrixSeqRow.factory() obj_.build(child_) self.row.append(obj_) elif nodeName_ == 'set': obj_ = RowSet.factory() obj_.build(child_) self.set.append(obj_) class RestrictionFormat(AbstractFormat): """The RestrictionFormat class is the container of restriction column definitions.""" subclass = None superclass = AbstractFormat def __init__(self, about=None, meta=None, states=None, char=None, set=None): super(RestrictionFormat, self).__init__(about, meta, states, char, set, ) if states is None: self.states = [] else: self.states = states if char is None: self.char = [] else: self.char = char if set is None: self.set = [] else: self.set = set def factory(*args_, **kwargs_): if RestrictionFormat.subclass: return RestrictionFormat.subclass(*args_, **kwargs_) else: return RestrictionFormat(*args_, **kwargs_) factory = staticmethod(factory) def get_states(self): return self.states def set_states(self, states): self.states = states def add_states(self, value): self.states.append(value) def insert_states(self, index, value): self.states[index] = value def get_char(self): return self.char def set_char(self, char): self.char = char def add_char(self, value): self.char.append(value) def insert_char(self, index, value): self.char[index] = value def get_set(self): return self.set def set_set(self, set): self.set = set def add_set(self, value): self.set.append(value) def insert_set(self, index, value): self.set[index] = value def export(self, outfile, level, namespace_='', name_='RestrictionFormat', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='RestrictionFormat') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='RestrictionFormat'): super(RestrictionFormat, self).exportAttributes(outfile, level, already_processed, namespace_, name_='RestrictionFormat') def exportChildren(self, outfile, level, namespace_='', name_='RestrictionFormat'): for states_ in self.states: states_.export(outfile, level, namespace_, name_='states') for char_ in self.char: char_.export(outfile, level, namespace_, name_='char') for set_ in self.set: set_.export(outfile, level, namespace_, name_='set') def hasContent_(self): if ( self.states or self.char or self.set ): return True else: return False def exportLiteral(self, outfile, level, name_='RestrictionFormat'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('states=[\n') level += 1 for states_ in self.states: showIndent(outfile, level) outfile.write('model_.RestrictionStates(\n') states_.exportLiteral(outfile, level, name_='RestrictionStates') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('char=[\n') level += 1 for char_ in self.char: showIndent(outfile, level) outfile.write('model_.RestrictionChar(\n') char_.exportLiteral(outfile, level, name_='RestrictionChar') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('set=[\n') level += 1 for set_ in self.set: showIndent(outfile, level) outfile.write('model_.CharSet(\n') set_.exportLiteral(outfile, level, name_='CharSet') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node): self.buildAttributes(node, node.attrib, []) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): super(RestrictionFormat, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'states': obj_ = RestrictionStates.factory() obj_.build(child_) self.states.append(obj_) elif nodeName_ == 'char': obj_ = RestrictionChar.factory() obj_.build(child_) self.char.append(obj_) elif nodeName_ == 'set': obj_ = CharSet.factory() obj_.build(child_) self.set.append(obj_) class AAObsMatrix(AbstractObsMatrix): """A matrix of rows with single character observations.""" subclass = None superclass = AbstractObsMatrix def __init__(self, about=None, meta=None, row=None, set=None): super(AAObsMatrix, self).__init__(about, meta, row, set, ) if row is None: self.row = [] else: self.row = row if set is None: self.set = [] else: self.set = set def factory(*args_, **kwargs_): if AAObsMatrix.subclass: return AAObsMatrix.subclass(*args_, **kwargs_) else: return AAObsMatrix(*args_, **kwargs_) factory = staticmethod(factory) def get_row(self): return self.row def set_row(self, row): self.row = row def add_row(self, value): self.row.append(value) def insert_row(self, index, value): self.row[index] = value def get_set(self): return self.set def set_set(self, set): self.set = set def add_set(self, value): self.set.append(value) def insert_set(self, index, value): self.set[index] = value def export(self, outfile, level, namespace_='', name_='AAObsMatrix', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='AAObsMatrix') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='AAObsMatrix'): super(AAObsMatrix, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AAObsMatrix') def exportChildren(self, outfile, level, namespace_='', name_='AAObsMatrix'): for row_ in self.row: row_.export(outfile, level, namespace_, name_='row') for set_ in self.set: set_.export(outfile, level, namespace_, name_='set') def hasContent_(self): if ( self.row or self.set ): return True else: return False def exportLiteral(self, outfile, level, name_='AAObsMatrix'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('row=[\n') level += 1 for row_ in self.row: showIndent(outfile, level) outfile.write('model_.AAMatrixObsRow(\n') row_.exportLiteral(outfile, level, name_='AAMatrixObsRow') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('set=[\n') level += 1 for set_ in self.set: showIndent(outfile, level) outfile.write('model_.RowSet(\n') set_.exportLiteral(outfile, level, name_='RowSet') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node): self.buildAttributes(node, node.attrib, []) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): super(AAObsMatrix, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'row': obj_ = AAMatrixObsRow.factory() obj_.build(child_) self.row.append(obj_) elif nodeName_ == 'set': obj_ = RowSet.factory() obj_.build(child_) self.set.append(obj_) class AASeqMatrix(AbstractSeqMatrix): """A matrix of rows with amino acid data as sequence strings.""" subclass = None superclass = AbstractSeqMatrix def __init__(self, about=None, meta=None, row=None, set=None): super(AASeqMatrix, self).__init__(about, meta, row, set, ) if row is None: self.row = [] else: self.row = row if set is None: self.set = [] else: self.set = set def factory(*args_, **kwargs_): if AASeqMatrix.subclass: return AASeqMatrix.subclass(*args_, **kwargs_) else: return AASeqMatrix(*args_, **kwargs_) factory = staticmethod(factory) def get_row(self): return self.row def set_row(self, row): self.row = row def add_row(self, value): self.row.append(value) def insert_row(self, index, value): self.row[index] = value def get_set(self): return self.set def set_set(self, set): self.set = set def add_set(self, value): self.set.append(value) def insert_set(self, index, value): self.set[index] = value def export(self, outfile, level, namespace_='', name_='AASeqMatrix', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='AASeqMatrix') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='AASeqMatrix'): super(AASeqMatrix, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AASeqMatrix') def exportChildren(self, outfile, level, namespace_='', name_='AASeqMatrix'): for row_ in self.row: row_.export(outfile, level, namespace_, name_='row') for set_ in self.set: set_.export(outfile, level, namespace_, name_='set') def hasContent_(self): if ( self.row or self.set ): return True else: return False def exportLiteral(self, outfile, level, name_='AASeqMatrix'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('row=[\n') level += 1 for row_ in self.row: showIndent(outfile, level) outfile.write('model_.AAMatrixSeqRow(\n') row_.exportLiteral(outfile, level, name_='AAMatrixSeqRow') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('set=[\n') level += 1 for set_ in self.set: showIndent(outfile, level) outfile.write('model_.RowSet(\n') set_.exportLiteral(outfile, level, name_='RowSet') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node): self.buildAttributes(node, node.attrib, []) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): super(AASeqMatrix, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'row': obj_ = AAMatrixSeqRow.factory() obj_.build(child_) self.row.append(obj_) elif nodeName_ == 'set': obj_ = RowSet.factory() obj_.build(child_) self.set.append(obj_) class AAFormat(AbstractFormat): """The AAFormat class is the container of amino acid column definitions.""" subclass = None superclass = AbstractFormat def __init__(self, about=None, meta=None, states=None, char=None, set=None): super(AAFormat, self).__init__(about, meta, states, char, set, ) if states is None: self.states = [] else: self.states = states if char is None: self.char = [] else: self.char = char if set is None: self.set = [] else: self.set = set def factory(*args_, **kwargs_): if AAFormat.subclass: return AAFormat.subclass(*args_, **kwargs_) else: return AAFormat(*args_, **kwargs_) factory = staticmethod(factory) def get_states(self): return self.states def set_states(self, states): self.states = states def add_states(self, value): self.states.append(value) def insert_states(self, index, value): self.states[index] = value def get_char(self): return self.char def set_char(self, char): self.char = char def add_char(self, value): self.char.append(value) def insert_char(self, index, value): self.char[index] = value def get_set(self): return self.set def set_set(self, set): self.set = set def add_set(self, value): self.set.append(value) def insert_set(self, index, value): self.set[index] = value def export(self, outfile, level, namespace_='', name_='AAFormat', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='AAFormat') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='AAFormat'): super(AAFormat, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AAFormat') def exportChildren(self, outfile, level, namespace_='', name_='AAFormat'): for states_ in self.states: states_.export(outfile, level, namespace_, name_='states') for char_ in self.char: char_.export(outfile, level, namespace_, name_='char') for set_ in self.set: set_.export(outfile, level, namespace_, name_='set') def hasContent_(self): if ( self.states or self.char or self.set ): return True else: return False def exportLiteral(self, outfile, level, name_='AAFormat'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('states=[\n') level += 1 for states_ in self.states: showIndent(outfile, level) outfile.write('model_.AAStates(\n') states_.exportLiteral(outfile, level, name_='AAStates') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('char=[\n') level += 1 for char_ in self.char: showIndent(outfile, level) outfile.write('model_.AAChar(\n') char_.exportLiteral(outfile, level, name_='AAChar') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('set=[\n') level += 1 for set_ in self.set: showIndent(outfile, level) outfile.write('model_.CharSet(\n') set_.exportLiteral(outfile, level, name_='CharSet') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node): self.buildAttributes(node, node.attrib, []) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): super(AAFormat, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'states': obj_ = AAStates.factory() obj_.build(child_) self.states.append(obj_) elif nodeName_ == 'char': obj_ = AAChar.factory() obj_.build(child_) self.char.append(obj_) elif nodeName_ == 'set': obj_ = CharSet.factory() obj_.build(child_) self.set.append(obj_) class DNAObsMatrix(AbstractObsMatrix): """A matrix of rows with single character observations.""" subclass = None superclass = AbstractObsMatrix def __init__(self, about=None, meta=None, row=None, set=None): super(DNAObsMatrix, self).__init__(about, meta, row, set, ) if row is None: self.row = [] else: self.row = row if set is None: self.set = [] else: self.set = set def factory(*args_, **kwargs_): if DNAObsMatrix.subclass: return DNAObsMatrix.subclass(*args_, **kwargs_) else: return DNAObsMatrix(*args_, **kwargs_) factory = staticmethod(factory) def get_row(self): return self.row def set_row(self, row): self.row = row def add_row(self, value): self.row.append(value) def insert_row(self, index, value): self.row[index] = value def get_set(self): return self.set def set_set(self, set): self.set = set def add_set(self, value): self.set.append(value) def insert_set(self, index, value): self.set[index] = value def export(self, outfile, level, namespace_='', name_='DNAObsMatrix', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='DNAObsMatrix') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='DNAObsMatrix'): super(DNAObsMatrix, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DNAObsMatrix') def exportChildren(self, outfile, level, namespace_='', name_='DNAObsMatrix'): for row_ in self.row: row_.export(outfile, level, namespace_, name_='row') for set_ in self.set: set_.export(outfile, level, namespace_, name_='set') def hasContent_(self): if ( self.row or self.set ): return True else: return False def exportLiteral(self, outfile, level, name_='DNAObsMatrix'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('row=[\n') level += 1 for row_ in self.row: showIndent(outfile, level) outfile.write('model_.DNAMatrixObsRow(\n') row_.exportLiteral(outfile, level, name_='DNAMatrixObsRow') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('set=[\n') level += 1 for set_ in self.set: showIndent(outfile, level) outfile.write('model_.RowSet(\n') set_.exportLiteral(outfile, level, name_='RowSet') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node): self.buildAttributes(node, node.attrib, []) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): super(DNAObsMatrix, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'row': obj_ = DNAMatrixObsRow.factory() obj_.build(child_) self.row.append(obj_) elif nodeName_ == 'set': obj_ = RowSet.factory() obj_.build(child_) self.set.append(obj_) class DNASeqMatrix(AbstractSeqMatrix): """A matrix of rows with seq strings of type DNA.""" subclass = None superclass = AbstractSeqMatrix def __init__(self, about=None, meta=None, row=None, set=None): super(DNASeqMatrix, self).__init__(about, meta, row, set, ) if row is None: self.row = [] else: self.row = row if set is None: self.set = [] else: self.set = set def factory(*args_, **kwargs_): if DNASeqMatrix.subclass: return DNASeqMatrix.subclass(*args_, **kwargs_) else: return DNASeqMatrix(*args_, **kwargs_) factory = staticmethod(factory) def get_row(self): return self.row def set_row(self, row): self.row = row def add_row(self, value): self.row.append(value) def insert_row(self, index, value): self.row[index] = value def get_set(self): return self.set def set_set(self, set): self.set = set def add_set(self, value): self.set.append(value) def insert_set(self, index, value): self.set[index] = value def export(self, outfile, level, namespace_='', name_='DNASeqMatrix', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='DNASeqMatrix') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='DNASeqMatrix'): super(DNASeqMatrix, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DNASeqMatrix') def exportChildren(self, outfile, level, namespace_='', name_='DNASeqMatrix'): for row_ in self.row: row_.export(outfile, level, namespace_, name_='row') for set_ in self.set: set_.export(outfile, level, namespace_, name_='set') def hasContent_(self): if ( self.row or self.set ): return True else: return False def exportLiteral(self, outfile, level, name_='DNASeqMatrix'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('row=[\n') level += 1 for row_ in self.row: showIndent(outfile, level) outfile.write('model_.DNAMatrixSeqRow(\n') row_.exportLiteral(outfile, level, name_='DNAMatrixSeqRow') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('set=[\n') level += 1 for set_ in self.set: showIndent(outfile, level) outfile.write('model_.RowSet(\n') set_.exportLiteral(outfile, level, name_='RowSet') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node): self.buildAttributes(node, node.attrib, []) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): super(DNASeqMatrix, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'row': obj_ = DNAMatrixSeqRow.factory() obj_.build(child_) self.row.append(obj_) elif nodeName_ == 'set': obj_ = RowSet.factory() obj_.build(child_) self.set.append(obj_) class DNAFormat(AbstractFormat): """The DNAFormat class is the container of DNA column definitions.""" subclass = None superclass = AbstractFormat def __init__(self, about=None, meta=None, states=None, char=None, set=None): super(DNAFormat, self).__init__(about, meta, states, char, set, ) if states is None: self.states = [] else: self.states = states if char is None: self.char = [] else: self.char = char if set is None: self.set = [] else: self.set = set def factory(*args_, **kwargs_): if DNAFormat.subclass: return DNAFormat.subclass(*args_, **kwargs_) else: return DNAFormat(*args_, **kwargs_) factory = staticmethod(factory) def get_states(self): return self.states def set_states(self, states): self.states = states def add_states(self, value): self.states.append(value) def insert_states(self, index, value): self.states[index] = value def get_char(self): return self.char def set_char(self, char): self.char = char def add_char(self, value): self.char.append(value) def insert_char(self, index, value): self.char[index] = value def get_set(self): return self.set def set_set(self, set): self.set = set def add_set(self, value): self.set.append(value) def insert_set(self, index, value): self.set[index] = value def export(self, outfile, level, namespace_='', name_='DNAFormat', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='DNAFormat') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='DNAFormat'): super(DNAFormat, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DNAFormat') def exportChildren(self, outfile, level, namespace_='', name_='DNAFormat'): for states_ in self.states: states_.export(outfile, level, namespace_, name_='states') for char_ in self.char: char_.export(outfile, level, namespace_, name_='char') for set_ in self.set: set_.export(outfile, level, namespace_, name_='set') def hasContent_(self): if ( self.states or self.char or self.set ): return True else: return False def exportLiteral(self, outfile, level, name_='DNAFormat'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('states=[\n') level += 1 for states_ in self.states: showIndent(outfile, level) outfile.write('model_.DNAStates(\n') states_.exportLiteral(outfile, level, name_='DNAStates') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('char=[\n') level += 1 for char_ in self.char: showIndent(outfile, level) outfile.write('model_.DNAChar(\n') char_.exportLiteral(outfile, level, name_='DNAChar') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('set=[\n') level += 1 for set_ in self.set: showIndent(outfile, level) outfile.write('model_.CharSet(\n') set_.exportLiteral(outfile, level, name_='CharSet') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node): self.buildAttributes(node, node.attrib, []) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): super(DNAFormat, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'states': obj_ = DNAStates.factory() obj_.build(child_) self.states.append(obj_) elif nodeName_ == 'char': obj_ = DNAChar.factory() obj_.build(child_) self.char.append(obj_) elif nodeName_ == 'set': obj_ = CharSet.factory() obj_.build(child_) self.set.append(obj_) class AbstractObs(Labelled): """The AbstractObs type is the superclass for single observations, i.e. cells in a matrix. A concrete instance of AbstractObs has a "char" attribute that refers to an explicitly defined character (e.g. in categorical matrices), and a "state" attribute that either holds a reference to an explicitly defined state, or a raw state value (a continuous value).""" subclass = None superclass = Labelled def __init__(self, about=None, meta=None, label=None, char=None, state=None, valueOf_=None, mixedclass_=None, content_=None): super(AbstractObs, self).__init__(about, meta, label, valueOf_, mixedclass_, content_, ) self.char = _cast(None, char) self.state = _cast(None, state) self.valueOf_ = valueOf_ if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if AbstractObs.subclass: return AbstractObs.subclass(*args_, **kwargs_) else: return AbstractObs(*args_, **kwargs_) factory = staticmethod(factory) def get_char(self): return self.char def set_char(self, char): self.char = char def get_state(self): return self.state def set_state(self, state): self.state = state def get_valueOf_(self): return self.valueOf_ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='AbstractObs', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='AbstractObs') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') outfile.write(' xsi:type="AbstractObs"') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='AbstractObs'): super(AbstractObs, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractObs') outfile.write(' char=%s' % (quote_attrib(self.char), )) outfile.write(' state=%s' % (quote_attrib(self.state), )) def exportChildren(self, outfile, level, namespace_='', name_='AbstractObs'): super(AbstractObs, self).exportChildren(outfile, level, namespace_, name_) def hasContent_(self): if ( self.valueOf_ or super(AbstractObs, self).hasContent_() ): return True else: return False def exportLiteral(self, outfile, level, name_='AbstractObs'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): if self.char is not None: showIndent(outfile, level) outfile.write('char = %s,\n' % (self.char,)) if self.state is not None: showIndent(outfile, level) outfile.write('state = %s,\n' % (self.state,)) super(AbstractObs, self).exportLiteralAttributes(outfile, level, name_) def exportLiteralChildren(self, outfile, level, name_): super(AbstractObs, self).exportLiteralChildren(outfile, level, name_) showIndent(outfile, level) outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,)) def build(self, node): self.buildAttributes(node, node.attrib, []) self.valueOf_ = get_all_text_(node) if node.text is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', node.text) self.content_.append(obj_) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): value = attrs.get('char') if value is not None and 'char' not in already_processed: already_processed.append('char') self.char = value value = attrs.get('state') if value is not None and 'state' not in already_processed: already_processed.append('state') self.state = value super(AbstractObs, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if not from_subclass and child_.tail is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.tail) self.content_.append(obj_) super(AbstractObs, self).buildChildren(child_, nodeName_, True) pass class ContinuousObs(AbstractObs): """This is a single cell in a matrix containing a continuous observation.""" subclass = None superclass = AbstractObs def __init__(self, about=None, meta=None, label=None, char=None, state=None): super(ContinuousObs, self).__init__(about, meta, label, char, state, ) self.char = _cast(None, char) self.state = _cast(None, state) if meta is None: self.meta = [] else: self.meta = meta def factory(*args_, **kwargs_): if ContinuousObs.subclass: return ContinuousObs.subclass(*args_, **kwargs_) else: return ContinuousObs(*args_, **kwargs_) factory = staticmethod(factory) def get_meta(self): return self.meta def set_meta(self, meta): self.meta = meta def add_meta(self, value): self.meta.append(value) def insert_meta(self, index, value): self.meta[index] = value def get_char(self): return self.char def set_char(self, char): self.char = char def get_state(self): return self.state def set_state(self, state): self.state = state def validate_ContinuousToken(self, value): pass def export(self, outfile, level, namespace_='', name_='ContinuousObs', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='ContinuousObs') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='ContinuousObs'): super(ContinuousObs, self).exportAttributes(outfile, level, already_processed, namespace_, name_='ContinuousObs') outfile.write(' char=%s' % (self.gds_format_string(quote_attrib(self.char).encode(ExternalEncoding), input_name='char'), )) outfile.write(' state=%s' % (quote_attrib(self.state), )) def exportChildren(self, outfile, level, namespace_='', name_='ContinuousObs'): for meta_ in self.get_meta(): meta_.export(outfile, level, namespace_, name_='meta') def hasContent_(self): if ( self.meta ): return True else: return False def exportLiteral(self, outfile, level, name_='ContinuousObs'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): if self.char is not None: showIndent(outfile, level) outfile.write('char = "%s",\n' % (self.char,)) if self.state is not None: showIndent(outfile, level) outfile.write('state = %e,\n' % (self.state,)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('meta=[\n') level += 1 for meta_ in self.meta: showIndent(outfile, level) outfile.write('model_.Meta(\n') meta_.exportLiteral(outfile, level, name_='Meta') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node): self.buildAttributes(node, node.attrib, []) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): value = attrs.get('char') if value is not None and 'char' not in already_processed: already_processed.append('char') self.char = value value = attrs.get('state') if value is not None and 'state' not in already_processed: already_processed.append('state') self.state = value self.validate_ContinuousToken(self.state) super(ContinuousObs, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'meta': type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type') if type_name_ is None: type_name_ = child_.attrib.get('type') if type_name_ is not None: type_names_ = type_name_.split(':') if len(type_names_) == 1: type_name_ = type_names_[0] else: type_name_ = type_names_[1] class_ = globals()[type_name_] obj_ = class_.factory() obj_.build(child_) else: raise NotImplementedError( 'Class not implemented for <meta> element') self.meta.append(obj_) class IDTagged(Labelled): """The IDTagged complexType is a super class for objects that require unique id attributes of type xs:ID. The id must be unique within the XML document.""" subclass = None superclass = Labelled def __init__(self, about=None, meta=None, label=None, id=None, valueOf_=None, mixedclass_=None, content_=None): super(IDTagged, self).__init__(about, meta, label, valueOf_, mixedclass_, content_, ) self.id = _cast(None, id) self.valueOf_ = valueOf_ if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if IDTagged.subclass: return IDTagged.subclass(*args_, **kwargs_) else: return IDTagged(*args_, **kwargs_) factory = staticmethod(factory) def get_id(self): return self.id def set_id(self, id): self.id = id def get_valueOf_(self): return self.valueOf_ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='IDTagged', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='IDTagged') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') outfile.write(' xsi:type="IDTagged"') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='IDTagged'): super(IDTagged, self).exportAttributes(outfile, level, already_processed, namespace_, name_='IDTagged') outfile.write(' id=%s' % (self.gds_format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'), )) def exportChildren(self, outfile, level, namespace_='', name_='IDTagged'): super(IDTagged, self).exportChildren(outfile, level, namespace_, name_) def hasContent_(self): if ( self.valueOf_ or super(IDTagged, self).hasContent_() ): return True else: return False def exportLiteral(self, outfile, level, name_='IDTagged'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): if self.id is not None: showIndent(outfile, level) outfile.write('id = "%s",\n' % (self.id,)) super(IDTagged, self).exportLiteralAttributes(outfile, level, name_) def exportLiteralChildren(self, outfile, level, name_): super(IDTagged, self).exportLiteralChildren(outfile, level, name_) showIndent(outfile, level) outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,)) def build(self, node): self.buildAttributes(node, node.attrib, []) self.valueOf_ = get_all_text_(node) if node.text is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', node.text) self.content_.append(obj_) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): value = attrs.get('id') if value is not None and 'id' not in already_processed: already_processed.append('id') self.id = value super(IDTagged, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if not from_subclass and child_.tail is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.tail) self.content_.append(obj_) super(IDTagged, self).buildChildren(child_, nodeName_, True) pass class Taxa(IDTagged): subclass = None superclass = IDTagged def __init__(self, about=None, meta=None, label=None, id=None, otu=None, set=None): super(Taxa, self).__init__(about, meta, label, id, ) if otu is None: self.otu = [] else: self.otu = otu if set is None: self.set = [] else: self.set = set def factory(*args_, **kwargs_): if Taxa.subclass: return Taxa.subclass(*args_, **kwargs_) else: return Taxa(*args_, **kwargs_) factory = staticmethod(factory) def get_otu(self): return self.otu def set_otu(self, otu): self.otu = otu def add_otu(self, value): self.otu.append(value) def insert_otu(self, index, value): self.otu[index] = value def get_set(self): return self.set def set_set(self, set): self.set = set def add_set(self, value): self.set.append(value) def insert_set(self, index, value): self.set[index] = value def export(self, outfile, level, namespace_='', name_='Taxa', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='Taxa') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') outfile.write(' xsi:type="Taxa"') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='Taxa'): super(Taxa, self).exportAttributes(outfile, level, already_processed, namespace_, name_='Taxa') def exportChildren(self, outfile, level, namespace_='', name_='Taxa'): super(Taxa, self).exportChildren(outfile, level, namespace_, name_) for otu_ in self.otu: otu_.export(outfile, level, namespace_, name_='otu') for set_ in self.set: set_.export(outfile, level, namespace_, name_='set') def hasContent_(self): if ( self.otu or self.set or super(Taxa, self).hasContent_() ): return True else: return False def exportLiteral(self, outfile, level, name_='Taxa'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): super(Taxa, self).exportLiteralAttributes(outfile, level, name_) def exportLiteralChildren(self, outfile, level, name_): super(Taxa, self).exportLiteralChildren(outfile, level, name_) showIndent(outfile, level) outfile.write('otu=[\n') level += 1 for otu_ in self.otu: showIndent(outfile, level) outfile.write('model_.Taxon(\n') otu_.exportLiteral(outfile, level, name_='Taxon') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('set=[\n') level += 1 for set_ in self.set: showIndent(outfile, level) outfile.write('model_.TaxonSet(\n') set_.exportLiteral(outfile, level, name_='TaxonSet') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node): self.buildAttributes(node, node.attrib, []) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): super(Taxa, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'otu': obj_ = Taxon.factory() obj_.build(child_) self.otu.append(obj_) elif nodeName_ == 'set': obj_ = TaxonSet.factory() obj_.build(child_) self.set.append(obj_) super(Taxa, self).buildChildren(child_, nodeName_, True) class Taxon(IDTagged): subclass = None superclass = IDTagged def __init__(self, about=None, meta=None, label=None, id=None): super(Taxon, self).__init__(about, meta, label, id, ) pass def factory(*args_, **kwargs_): if Taxon.subclass: return Taxon.subclass(*args_, **kwargs_) else: return Taxon(*args_, **kwargs_) factory = staticmethod(factory) def export(self, outfile, level, namespace_='', name_='Taxon', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='Taxon') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') outfile.write(' xsi:type="Taxon"') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='Taxon'): super(Taxon, self).exportAttributes(outfile, level, already_processed, namespace_, name_='Taxon') def exportChildren(self, outfile, level, namespace_='', name_='Taxon'): super(Taxon, self).exportChildren(outfile, level, namespace_, name_) def hasContent_(self): if ( super(Taxon, self).hasContent_() ): return True else: return False def exportLiteral(self, outfile, level, name_='Taxon'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): super(Taxon, self).exportLiteralAttributes(outfile, level, name_) def exportLiteralChildren(self, outfile, level, name_): super(Taxon, self).exportLiteralChildren(outfile, level, name_) def build(self, node): self.buildAttributes(node, node.attrib, []) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): super(Taxon, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): super(Taxon, self).buildChildren(child_, nodeName_, True) pass class AbstractTrees(IDTagged): """The AbstractTrees superclass is what concrete trees inherit from.""" subclass = None superclass = IDTagged def __init__(self, about=None, meta=None, label=None, id=None, network=None, tree=None, set=None, valueOf_=None, mixedclass_=None, content_=None): super(AbstractTrees, self).__init__(about, meta, label, id, valueOf_, mixedclass_, content_, ) if network is None: self.network = [] else: self.network = network if tree is None: self.tree = [] else: self.tree = tree if set is None: self.set = [] else: self.set = set self.valueOf_ = valueOf_ if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if AbstractTrees.subclass: return AbstractTrees.subclass(*args_, **kwargs_) else: return AbstractTrees(*args_, **kwargs_) factory = staticmethod(factory) def get_network(self): return self.network def set_network(self, network): self.network = network def add_network(self, value): self.network.append(value) def insert_network(self, index, value): self.network[index] = value def get_tree(self): return self.tree def set_tree(self, tree): self.tree = tree def add_tree(self, value): self.tree.append(value) def insert_tree(self, index, value): self.tree[index] = value def get_set(self): return self.set def set_set(self, set): self.set = set def add_set(self, value): self.set.append(value) def insert_set(self, index, value): self.set[index] = value def get_valueOf_(self): return self.valueOf_ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='AbstractTrees', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='AbstractTrees') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') outfile.write(' xsi:type="AbstractTrees"') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='AbstractTrees'): super(AbstractTrees, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractTrees') def exportChildren(self, outfile, level, namespace_='', name_='AbstractTrees'): super(AbstractTrees, self).exportChildren(outfile, level, namespace_, name_) for item_ in self.content_: item_.export(outfile, level, item_.name, namespace_) def hasContent_(self): if ( self.network or self.tree or self.set or self.valueOf_ or super(AbstractTrees, self).hasContent_() ): return True else: return False def exportLiteral(self, outfile, level, name_='AbstractTrees'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): super(AbstractTrees, self).exportLiteralAttributes(outfile, level, name_) def exportLiteralChildren(self, outfile, level, name_): super(AbstractTrees, self).exportLiteralChildren(outfile, level, name_) showIndent(outfile, level) outfile.write('content_ = [\n') for item_ in self.content_: item_.exportLiteral(outfile, level, name_) showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('content_ = [\n') for item_ in self.content_: item_.exportLiteral(outfile, level, name_) showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('content_ = [\n') for item_ in self.content_: item_.exportLiteral(outfile, level, name_) showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,)) def build(self, node): self.buildAttributes(node, node.attrib, []) self.valueOf_ = get_all_text_(node) if node.text is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', node.text) self.content_.append(obj_) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): super(AbstractTrees, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'network': type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type') if type_name_ is None: type_name_ = child_.attrib.get('type') if type_name_ is not None: type_names_ = type_name_.split(':') if len(type_names_) == 1: type_name_ = type_names_[0] else: type_name_ = type_names_[1] class_ = globals()[type_name_] obj_ = class_.factory() obj_.build(child_) else: raise NotImplementedError( 'Class not implemented for <network> element') obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'network', obj_) self.content_.append(obj_) if hasattr(self, 'add_network'): self.add_network(obj_.value) elif hasattr(self, 'set_network'): self.set_network(obj_.value) elif nodeName_ == 'tree': type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type') if type_name_ is None: type_name_ = child_.attrib.get('type') if type_name_ is not None: type_names_ = type_name_.split(':') if len(type_names_) == 1: type_name_ = type_names_[0] else: type_name_ = type_names_[1] class_ = globals()[type_name_] obj_ = class_.factory() obj_.build(child_) else: raise NotImplementedError( 'Class not implemented for <tree> element') obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'tree', obj_) self.content_.append(obj_) if hasattr(self, 'add_tree'): self.add_tree(obj_.value) elif hasattr(self, 'set_tree'): self.set_tree(obj_.value) elif nodeName_ == 'set': obj_ = TreeAndNetworkSet.factory() obj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'set', obj_) self.content_.append(obj_) if hasattr(self, 'add_set'): self.add_set(obj_.value) elif hasattr(self, 'set_set'): self.set_set(obj_.value) if not from_subclass and child_.tail is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.tail) self.content_.append(obj_) super(AbstractTrees, self).buildChildren(child_, nodeName_, True) class AbstractNetwork(IDTagged): """The AbstractNetwork superclass is what a concrete network inherits from.""" subclass = None superclass = IDTagged def __init__(self, about=None, meta=None, label=None, id=None, node=None, edge=None, set=None, valueOf_=None, mixedclass_=None, content_=None): super(AbstractNetwork, self).__init__(about, meta, label, id, valueOf_, mixedclass_, content_, ) if node is None: self.node = [] else: self.node = node if edge is None: self.edge = [] else: self.edge = edge if set is None: self.set = [] else: self.set = set self.valueOf_ = valueOf_ if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if AbstractNetwork.subclass: return AbstractNetwork.subclass(*args_, **kwargs_) else: return AbstractNetwork(*args_, **kwargs_) factory = staticmethod(factory) def get_node(self): return self.node def set_node(self, node): self.node = node def add_node(self, value): self.node.append(value) def insert_node(self, index, value): self.node[index] = value def get_edge(self): return self.edge def set_edge(self, edge): self.edge = edge def add_edge(self, value): self.edge.append(value) def insert_edge(self, index, value): self.edge[index] = value def get_set(self): return self.set def set_set(self, set): self.set = set def add_set(self, value): self.set.append(value) def insert_set(self, index, value): self.set[index] = value def get_valueOf_(self): return self.valueOf_ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='AbstractNetwork', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='AbstractNetwork') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') outfile.write(' xsi:type="AbstractNetwork"') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='AbstractNetwork'): super(AbstractNetwork, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractNetwork') def exportChildren(self, outfile, level, namespace_='', name_='AbstractNetwork'): super(AbstractNetwork, self).exportChildren(outfile, level, namespace_, name_) for item_ in self.content_: item_.export(outfile, level, item_.name, namespace_) def hasContent_(self): if ( self.node or self.edge or self.set or self.valueOf_ or super(AbstractNetwork, self).hasContent_() ): return True else: return False def exportLiteral(self, outfile, level, name_='AbstractNetwork'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): super(AbstractNetwork, self).exportLiteralAttributes(outfile, level, name_) def exportLiteralChildren(self, outfile, level, name_): super(AbstractNetwork, self).exportLiteralChildren(outfile, level, name_) showIndent(outfile, level) outfile.write('content_ = [\n') for item_ in self.content_: item_.exportLiteral(outfile, level, name_) showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('content_ = [\n') for item_ in self.content_: item_.exportLiteral(outfile, level, name_) showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('content_ = [\n') for item_ in self.content_: item_.exportLiteral(outfile, level, name_) showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,)) def build(self, node): self.buildAttributes(node, node.attrib, []) self.valueOf_ = get_all_text_(node) if node.text is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', node.text) self.content_.append(obj_) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): super(AbstractNetwork, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'node': type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type') if type_name_ is None: type_name_ = child_.attrib.get('type') if type_name_ is not None: type_names_ = type_name_.split(':') if len(type_names_) == 1: type_name_ = type_names_[0] else: type_name_ = type_names_[1] class_ = globals()[type_name_] obj_ = class_.factory() obj_.build(child_) else: raise NotImplementedError( 'Class not implemented for <node> element') obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'node', obj_) self.content_.append(obj_) if hasattr(self, 'add_node'): self.add_node(obj_.value) elif hasattr(self, 'set_node'): self.set_node(obj_.value) elif nodeName_ == 'edge': type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type') if type_name_ is None: type_name_ = child_.attrib.get('type') if type_name_ is not None: type_names_ = type_name_.split(':') if len(type_names_) == 1: type_name_ = type_names_[0] else: type_name_ = type_names_[1] class_ = globals()[type_name_] obj_ = class_.factory() obj_.build(child_) else: raise NotImplementedError( 'Class not implemented for <edge> element') obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'edge', obj_) self.content_.append(obj_) if hasattr(self, 'add_edge'): self.add_edge(obj_.value) elif hasattr(self, 'set_edge'): self.set_edge(obj_.value) elif nodeName_ == 'set': obj_ = NodeAndRootEdgeAndEdgeSet.factory() obj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'set', obj_) self.content_.append(obj_) if hasattr(self, 'add_set'): self.add_set(obj_.value) elif hasattr(self, 'set_set'): self.set_set(obj_.value) if not from_subclass and child_.tail is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.tail) self.content_.append(obj_) super(AbstractNetwork, self).buildChildren(child_, nodeName_, True) class AbstractTree(IDTagged): """The AbstractTree superclass is what a concrete tree inherits from.""" subclass = None superclass = IDTagged def __init__(self, about=None, meta=None, label=None, id=None, node=None, rootedge=None, edge=None, set=None, valueOf_=None, mixedclass_=None, content_=None): super(AbstractTree, self).__init__(about, meta, label, id, valueOf_, mixedclass_, content_, ) if node is None: self.node = [] else: self.node = node self.rootedge = rootedge if edge is None: self.edge = [] else: self.edge = edge if set is None: self.set = [] else: self.set = set self.valueOf_ = valueOf_ if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if AbstractTree.subclass: return AbstractTree.subclass(*args_, **kwargs_) else: return AbstractTree(*args_, **kwargs_) factory = staticmethod(factory) def get_node(self): return self.node def set_node(self, node): self.node = node def add_node(self, value): self.node.append(value) def insert_node(self, index, value): self.node[index] = value def get_rootedge(self): return self.rootedge def set_rootedge(self, rootedge): self.rootedge = rootedge def get_edge(self): return self.edge def set_edge(self, edge): self.edge = edge def add_edge(self, value): self.edge.append(value) def insert_edge(self, index, value): self.edge[index] = value def get_set(self): return self.set def set_set(self, set): self.set = set def add_set(self, value): self.set.append(value) def insert_set(self, index, value): self.set[index] = value def get_valueOf_(self): return self.valueOf_ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='AbstractTree', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='AbstractTree') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') outfile.write(' xsi:type="AbstractTree"') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='AbstractTree'): super(AbstractTree, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractTree') def exportChildren(self, outfile, level, namespace_='', name_='AbstractTree'): super(AbstractTree, self).exportChildren(outfile, level, namespace_, name_) for item_ in self.content_: item_.export(outfile, level, item_.name, namespace_) def hasContent_(self): if ( self.node or self.rootedge is not None or self.edge or self.set or self.valueOf_ or super(AbstractTree, self).hasContent_() ): return True else: return False def exportLiteral(self, outfile, level, name_='AbstractTree'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): super(AbstractTree, self).exportLiteralAttributes(outfile, level, name_) def exportLiteralChildren(self, outfile, level, name_): super(AbstractTree, self).exportLiteralChildren(outfile, level, name_) showIndent(outfile, level) outfile.write('content_ = [\n') for item_ in self.content_: item_.exportLiteral(outfile, level, name_) showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('content_ = [\n') for item_ in self.content_: item_.exportLiteral(outfile, level, name_) showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('content_ = [\n') for item_ in self.content_: item_.exportLiteral(outfile, level, name_) showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('content_ = [\n') for item_ in self.content_: item_.exportLiteral(outfile, level, name_) showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,)) def build(self, node): self.buildAttributes(node, node.attrib, []) self.valueOf_ = get_all_text_(node) if node.text is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', node.text) self.content_.append(obj_) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): super(AbstractTree, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'node': type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type') if type_name_ is None: type_name_ = child_.attrib.get('type') if type_name_ is not None: type_names_ = type_name_.split(':') if len(type_names_) == 1: type_name_ = type_names_[0] else: type_name_ = type_names_[1] class_ = globals()[type_name_] obj_ = class_.factory() obj_.build(child_) else: raise NotImplementedError( 'Class not implemented for <node> element') obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'node', obj_) self.content_.append(obj_) if hasattr(self, 'add_node'): self.add_node(obj_.value) elif hasattr(self, 'set_node'): self.set_node(obj_.value) elif nodeName_ == 'rootedge': type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type') if type_name_ is None: type_name_ = child_.attrib.get('type') if type_name_ is not None: type_names_ = type_name_.split(':') if len(type_names_) == 1: type_name_ = type_names_[0] else: type_name_ = type_names_[1] class_ = globals()[type_name_] obj_ = class_.factory() obj_.build(child_) else: raise NotImplementedError( 'Class not implemented for <rootedge> element') obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'rootedge', obj_) self.content_.append(obj_) if hasattr(self, 'add_rootedge'): self.add_rootedge(obj_.value) elif hasattr(self, 'set_rootedge'): self.set_rootedge(obj_.value) elif nodeName_ == 'edge': type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type') if type_name_ is None: type_name_ = child_.attrib.get('type') if type_name_ is not None: type_names_ = type_name_.split(':') if len(type_names_) == 1: type_name_ = type_names_[0] else: type_name_ = type_names_[1] class_ = globals()[type_name_] obj_ = class_.factory() obj_.build(child_) else: raise NotImplementedError( 'Class not implemented for <edge> element') obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'edge', obj_) self.content_.append(obj_) if hasattr(self, 'add_edge'): self.add_edge(obj_.value) elif hasattr(self, 'set_edge'): self.set_edge(obj_.value) elif nodeName_ == 'set': obj_ = NodeAndRootEdgeAndEdgeSet.factory() obj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'set', obj_) self.content_.append(obj_) if hasattr(self, 'add_set'): self.add_set(obj_.value) elif hasattr(self, 'set_set'): self.set_set(obj_.value) if not from_subclass and child_.tail is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.tail) self.content_.append(obj_) super(AbstractTree, self).buildChildren(child_, nodeName_, True) class AbstractRootEdge(IDTagged): """The AbstractRootEdge complex type is a superclass for the edge that leads into a root, i.e. an edge with only a target attribute, but no source attribute. This type of edge is used for coalescent trees, where the initial lineage has a certain length before things start splitting up.""" subclass = None superclass = IDTagged def __init__(self, about=None, meta=None, label=None, id=None, length=None, target=None, valueOf_=None, mixedclass_=None, content_=None): super(AbstractRootEdge, self).__init__(about, meta, label, id, valueOf_, mixedclass_, content_, ) self.length = _cast(None, length) self.target = _cast(None, target) self.valueOf_ = valueOf_ if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if AbstractRootEdge.subclass: return AbstractRootEdge.subclass(*args_, **kwargs_) else: return AbstractRootEdge(*args_, **kwargs_) factory = staticmethod(factory) def get_length(self): return self.length def set_length(self, length): self.length = length def get_target(self): return self.target def set_target(self, target): self.target = target def get_valueOf_(self): return self.valueOf_ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='AbstractRootEdge', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='AbstractRootEdge') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') outfile.write(' xsi:type="AbstractRootEdge"') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='AbstractRootEdge'): super(AbstractRootEdge, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractRootEdge') if self.length is not None and 'length' not in already_processed: already_processed.append('length') outfile.write(' length=%s' % (quote_attrib(self.length), )) outfile.write(' target=%s' % (self.gds_format_string(quote_attrib(self.target).encode(ExternalEncoding), input_name='target'), )) def exportChildren(self, outfile, level, namespace_='', name_='AbstractRootEdge'): super(AbstractRootEdge, self).exportChildren(outfile, level, namespace_, name_) def hasContent_(self): if ( self.valueOf_ or super(AbstractRootEdge, self).hasContent_() ): return True else: return False def exportLiteral(self, outfile, level, name_='AbstractRootEdge'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): if self.length is not None: showIndent(outfile, level) outfile.write('length = %s,\n' % (self.length,)) if self.target is not None: showIndent(outfile, level) outfile.write('target = "%s",\n' % (self.target,)) super(AbstractRootEdge, self).exportLiteralAttributes(outfile, level, name_) def exportLiteralChildren(self, outfile, level, name_): super(AbstractRootEdge, self).exportLiteralChildren(outfile, level, name_) showIndent(outfile, level) outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,)) def build(self, node): self.buildAttributes(node, node.attrib, []) self.valueOf_ = get_all_text_(node) if node.text is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', node.text) self.content_.append(obj_) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): value = attrs.get('length') if value is not None and 'length' not in already_processed: already_processed.append('length') self.length = value value = attrs.get('target') if value is not None and 'target' not in already_processed: already_processed.append('target') self.target = value super(AbstractRootEdge, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if not from_subclass and child_.tail is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.tail) self.content_.append(obj_) super(AbstractRootEdge, self).buildChildren(child_, nodeName_, True) pass class AbstractEdge(IDTagged): """The AbstractEdge superclass is what concrete edges inherit from by restriction. It represents an edge element much like that of GraphML, i.e. an element that connects node elements.""" subclass = None superclass = IDTagged def __init__(self, about=None, meta=None, label=None, id=None, source=None, length=None, target=None, valueOf_=None, mixedclass_=None, content_=None): super(AbstractEdge, self).__init__(about, meta, label, id, valueOf_, mixedclass_, content_, ) self.source = _cast(None, source) self.length = _cast(None, length) self.target = _cast(None, target) self.valueOf_ = valueOf_ if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if AbstractEdge.subclass: return AbstractEdge.subclass(*args_, **kwargs_) else: return AbstractEdge(*args_, **kwargs_) factory = staticmethod(factory) def get_source(self): return self.source def set_source(self, source): self.source = source def get_length(self): return self.length def set_length(self, length): self.length = length def get_target(self): return self.target def set_target(self, target): self.target = target def get_valueOf_(self): return self.valueOf_ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='AbstractEdge', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='AbstractEdge') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') outfile.write(' xsi:type="AbstractEdge"') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='AbstractEdge'): super(AbstractEdge, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractEdge') outfile.write(' source=%s' % (self.gds_format_string(quote_attrib(self.source).encode(ExternalEncoding), input_name='source'), )) if self.length is not None and 'length' not in already_processed: already_processed.append('length') outfile.write(' length=%s' % (quote_attrib(self.length), )) outfile.write(' target=%s' % (self.gds_format_string(quote_attrib(self.target).encode(ExternalEncoding), input_name='target'), )) def exportChildren(self, outfile, level, namespace_='', name_='AbstractEdge'): super(AbstractEdge, self).exportChildren(outfile, level, namespace_, name_) def hasContent_(self): if ( self.valueOf_ or super(AbstractEdge, self).hasContent_() ): return True else: return False def exportLiteral(self, outfile, level, name_='AbstractEdge'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): if self.source is not None: showIndent(outfile, level) outfile.write('source = "%s",\n' % (self.source,)) if self.length is not None: showIndent(outfile, level) outfile.write('length = %s,\n' % (self.length,)) if self.target is not None: showIndent(outfile, level) outfile.write('target = "%s",\n' % (self.target,)) super(AbstractEdge, self).exportLiteralAttributes(outfile, level, name_) def exportLiteralChildren(self, outfile, level, name_): super(AbstractEdge, self).exportLiteralChildren(outfile, level, name_) showIndent(outfile, level) outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,)) def build(self, node): self.buildAttributes(node, node.attrib, []) self.valueOf_ = get_all_text_(node) if node.text is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', node.text) self.content_.append(obj_) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): value = attrs.get('source') if value is not None and 'source' not in already_processed: already_processed.append('source') self.source = value value = attrs.get('length') if value is not None and 'length' not in already_processed: already_processed.append('length') self.length = value value = attrs.get('target') if value is not None and 'target' not in already_processed: already_processed.append('target') self.target = value super(AbstractEdge, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if not from_subclass and child_.tail is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.tail) self.content_.append(obj_) super(AbstractEdge, self).buildChildren(child_, nodeName_, True) pass class IntTree(AbstractTree): """A concrete tree implementation, with integer edge lengths.""" subclass = None superclass = AbstractTree def __init__(self, about=None, meta=None, label=None, id=None, node=None, rootedge=None, edge=None, set=None): super(IntTree, self).__init__(about, meta, label, id, node, rootedge, edge, set, ) if meta is None: self.meta = [] else: self.meta = meta if node is None: self.node = [] else: self.node = node self.rootedge = rootedge if edge is None: self.edge = [] else: self.edge = edge if set is None: self.set = [] else: self.set = set def factory(*args_, **kwargs_): if IntTree.subclass: return IntTree.subclass(*args_, **kwargs_) else: return IntTree(*args_, **kwargs_) factory = staticmethod(factory) def get_meta(self): return self.meta def set_meta(self, meta): self.meta = meta def add_meta(self, value): self.meta.append(value) def insert_meta(self, index, value): self.meta[index] = value def get_node(self): return self.node def set_node(self, node): self.node = node def add_node(self, value): self.node.append(value) def insert_node(self, index, value): self.node[index] = value def get_rootedge(self): return self.rootedge def set_rootedge(self, rootedge): self.rootedge = rootedge def get_edge(self): return self.edge def set_edge(self, edge): self.edge = edge def add_edge(self, value): self.edge.append(value) def insert_edge(self, index, value): self.edge[index] = value def get_set(self): return self.set def set_set(self, set): self.set = set def add_set(self, value): self.set.append(value) def insert_set(self, index, value): self.set[index] = value def export(self, outfile, level, namespace_='', name_='IntTree', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='IntTree') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='IntTree'): super(IntTree, self).exportAttributes(outfile, level, already_processed, namespace_, name_='IntTree') def exportChildren(self, outfile, level, namespace_='', name_='IntTree'): for meta_ in self.get_meta(): meta_.export(outfile, level, namespace_, name_='meta') for node_ in self.node: node_.export(outfile, level, namespace_, name_='node') if self.rootedge: self.rootedge.export(outfile, level, namespace_, name_='rootedge') for edge_ in self.edge: edge_.export(outfile, level, namespace_, name_='edge') for set_ in self.set: set_.export(outfile, level, namespace_, name_='set') def hasContent_(self): if ( self.meta or self.node or self.rootedge is not None or self.edge or self.set ): return True else: return False def exportLiteral(self, outfile, level, name_='IntTree'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('meta=[\n') level += 1 for meta_ in self.meta: showIndent(outfile, level) outfile.write('model_.Meta(\n') meta_.exportLiteral(outfile, level, name_='Meta') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('node=[\n') level += 1 for node_ in self.node: showIndent(outfile, level) outfile.write('model_.TreeNode(\n') node_.exportLiteral(outfile, level, name_='TreeNode') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') if self.rootedge is not None: showIndent(outfile, level) outfile.write('rootedge=model_.TreeIntRootEdge(\n') self.rootedge.exportLiteral(outfile, level, name_='rootedge') showIndent(outfile, level) outfile.write('),\n') showIndent(outfile, level) outfile.write('edge=[\n') level += 1 for edge_ in self.edge: showIndent(outfile, level) outfile.write('model_.TreeIntEdge(\n') edge_.exportLiteral(outfile, level, name_='TreeIntEdge') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('set=[\n') level += 1 for set_ in self.set: showIndent(outfile, level) outfile.write('model_.NodeAndRootEdgeAndEdgeSet(\n') set_.exportLiteral(outfile, level, name_='NodeAndRootEdgeAndEdgeSet') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node): self.buildAttributes(node, node.attrib, []) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): super(IntTree, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'meta': type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type') if type_name_ is None: type_name_ = child_.attrib.get('type') if type_name_ is not None: type_names_ = type_name_.split(':') if len(type_names_) == 1: type_name_ = type_names_[0] else: type_name_ = type_names_[1] class_ = globals()[type_name_] obj_ = class_.factory() obj_.build(child_) else: raise NotImplementedError( 'Class not implemented for <meta> element') self.meta.append(obj_) elif nodeName_ == 'node': obj_ = TreeNode.factory() obj_.build(child_) self.node.append(obj_) elif nodeName_ == 'rootedge': obj_ = TreeIntRootEdge.factory() obj_.build(child_) self.set_rootedge(obj_) elif nodeName_ == 'edge': obj_ = TreeIntEdge.factory() obj_.build(child_) self.edge.append(obj_) elif nodeName_ == 'set': obj_ = NodeAndRootEdgeAndEdgeSet.factory() obj_.build(child_) self.set.append(obj_) class FloatTree(AbstractTree): """A concrete tree implementation, with floating point edge lengths.""" subclass = None superclass = AbstractTree def __init__(self, about=None, meta=None, label=None, id=None, node=None, rootedge=None, edge=None, set=None): super(FloatTree, self).__init__(about, meta, label, id, node, rootedge, edge, set, ) if meta is None: self.meta = [] else: self.meta = meta if node is None: self.node = [] else: self.node = node self.rootedge = rootedge if edge is None: self.edge = [] else: self.edge = edge if set is None: self.set = [] else: self.set = set def factory(*args_, **kwargs_): if FloatTree.subclass: return FloatTree.subclass(*args_, **kwargs_) else: return FloatTree(*args_, **kwargs_) factory = staticmethod(factory) def get_meta(self): return self.meta def set_meta(self, meta): self.meta = meta def add_meta(self, value): self.meta.append(value) def insert_meta(self, index, value): self.meta[index] = value def get_node(self): return self.node def set_node(self, node): self.node = node def add_node(self, value): self.node.append(value) def insert_node(self, index, value): self.node[index] = value def get_rootedge(self): return self.rootedge def set_rootedge(self, rootedge): self.rootedge = rootedge def get_edge(self): return self.edge def set_edge(self, edge): self.edge = edge def add_edge(self, value): self.edge.append(value) def insert_edge(self, index, value): self.edge[index] = value def get_set(self): return self.set def set_set(self, set): self.set = set def add_set(self, value): self.set.append(value) def insert_set(self, index, value): self.set[index] = value def export(self, outfile, level, namespace_='', name_='FloatTree', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='FloatTree') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='FloatTree'): super(FloatTree, self).exportAttributes(outfile, level, already_processed, namespace_, name_='FloatTree') def exportChildren(self, outfile, level, namespace_='', name_='FloatTree'): for meta_ in self.get_meta(): meta_.export(outfile, level, namespace_, name_='meta') for node_ in self.node: node_.export(outfile, level, namespace_, name_='node') if self.rootedge: self.rootedge.export(outfile, level, namespace_, name_='rootedge') for edge_ in self.edge: edge_.export(outfile, level, namespace_, name_='edge') for set_ in self.set: set_.export(outfile, level, namespace_, name_='set') def hasContent_(self): if ( self.meta or self.node or self.rootedge is not None or self.edge or self.set ): return True else: return False def exportLiteral(self, outfile, level, name_='FloatTree'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): pass def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('meta=[\n') level += 1 for meta_ in self.meta: showIndent(outfile, level) outfile.write('model_.Meta(\n') meta_.exportLiteral(outfile, level, name_='Meta') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('node=[\n') level += 1 for node_ in self.node: showIndent(outfile, level) outfile.write('model_.TreeNode(\n') node_.exportLiteral(outfile, level, name_='TreeNode') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') if self.rootedge is not None: showIndent(outfile, level) outfile.write('rootedge=model_.TreeFloatRootEdge(\n') self.rootedge.exportLiteral(outfile, level, name_='rootedge') showIndent(outfile, level) outfile.write('),\n') showIndent(outfile, level) outfile.write('edge=[\n') level += 1 for edge_ in self.edge: showIndent(outfile, level) outfile.write('model_.TreeFloatEdge(\n') edge_.exportLiteral(outfile, level, name_='TreeFloatEdge') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('set=[\n') level += 1 for set_ in self.set: showIndent(outfile, level) outfile.write('model_.NodeAndRootEdgeAndEdgeSet(\n') set_.exportLiteral(outfile, level, name_='NodeAndRootEdgeAndEdgeSet') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node): self.buildAttributes(node, node.attrib, []) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): super(FloatTree, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'meta': type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type') if type_name_ is None: type_name_ = child_.attrib.get('type') if type_name_ is not None: type_names_ = type_name_.split(':') if len(type_names_) == 1: type_name_ = type_names_[0] else: type_name_ = type_names_[1] class_ = globals()[type_name_] obj_ = class_.factory() obj_.build(child_) else: raise NotImplementedError( 'Class not implemented for <meta> element') self.meta.append(obj_) elif nodeName_ == 'node': obj_ = TreeNode.factory() obj_.build(child_) self.node.append(obj_) elif nodeName_ == 'rootedge': obj_ = TreeFloatRootEdge.factory() obj_.build(child_) self.set_rootedge(obj_) elif nodeName_ == 'edge': obj_ = TreeFloatEdge.factory() obj_.build(child_) self.edge.append(obj_) elif nodeName_ == 'set': obj_ = NodeAndRootEdgeAndEdgeSet.factory() obj_.build(child_) self.set.append(obj_) class TreeIntRootEdge(AbstractRootEdge): """A concrete root edge implementation, with int length.""" subclass = None superclass = AbstractRootEdge def __init__(self, about=None, meta=None, label=None, id=None, length=None, target=None): super(TreeIntRootEdge, self).__init__(about, meta, label, id, length, target, ) self.length = _cast(int, length) if meta is None: self.meta = [] else: self.meta = meta def factory(*args_, **kwargs_): if TreeIntRootEdge.subclass: return TreeIntRootEdge.subclass(*args_, **kwargs_) else: return TreeIntRootEdge(*args_, **kwargs_) factory = staticmethod(factory) def get_meta(self): return self.meta def set_meta(self, meta): self.meta = meta def add_meta(self, value): self.meta.append(value) def insert_meta(self, index, value): self.meta[index] = value def get_length(self): return self.length def set_length(self, length): self.length = length def export(self, outfile, level, namespace_='', name_='TreeIntRootEdge', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='TreeIntRootEdge') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='TreeIntRootEdge'): super(TreeIntRootEdge, self).exportAttributes(outfile, level, already_processed, namespace_, name_='TreeIntRootEdge') if self.length is not None and 'length' not in already_processed: already_processed.append('length') outfile.write(' length="%s"' % self.gds_format_integer(self.length, input_name='length')) def exportChildren(self, outfile, level, namespace_='', name_='TreeIntRootEdge'): for meta_ in self.get_meta(): meta_.export(outfile, level, namespace_, name_='meta') def hasContent_(self): if ( self.meta ): return True else: return False def exportLiteral(self, outfile, level, name_='TreeIntRootEdge'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): if self.length is not None: showIndent(outfile, level) outfile.write('length = %d,\n' % (self.length,)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('meta=[\n') level += 1 for meta_ in self.meta: showIndent(outfile, level) outfile.write('model_.Meta(\n') meta_.exportLiteral(outfile, level, name_='Meta') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node): self.buildAttributes(node, node.attrib, []) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): value = attrs.get('length') if value is not None and 'length' not in already_processed: already_processed.append('length') try: self.length = int(value) except ValueError, exp: raise_parse_error(node, 'Bad integer attribute: %s' % exp) super(TreeIntRootEdge, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'meta': type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type') if type_name_ is None: type_name_ = child_.attrib.get('type') if type_name_ is not None: type_names_ = type_name_.split(':') if len(type_names_) == 1: type_name_ = type_names_[0] else: type_name_ = type_names_[1] class_ = globals()[type_name_] obj_ = class_.factory() obj_.build(child_) else: raise NotImplementedError( 'Class not implemented for <meta> element') self.meta.append(obj_) class TreeIntEdge(AbstractEdge): """A concrete edge implementation, with int length.""" subclass = None superclass = AbstractEdge def __init__(self, about=None, meta=None, label=None, id=None, source=None, length=None, target=None): super(TreeIntEdge, self).__init__(about, meta, label, id, source, length, target, ) self.length = _cast(int, length) if meta is None: self.meta = [] else: self.meta = meta def factory(*args_, **kwargs_): if TreeIntEdge.subclass: return TreeIntEdge.subclass(*args_, **kwargs_) else: return TreeIntEdge(*args_, **kwargs_) factory = staticmethod(factory) def get_meta(self): return self.meta def set_meta(self, meta): self.meta = meta def add_meta(self, value): self.meta.append(value) def insert_meta(self, index, value): self.meta[index] = value def get_length(self): return self.length def set_length(self, length): self.length = length def export(self, outfile, level, namespace_='', name_='TreeIntEdge', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='TreeIntEdge') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='TreeIntEdge'): super(TreeIntEdge, self).exportAttributes(outfile, level, already_processed, namespace_, name_='TreeIntEdge') if self.length is not None and 'length' not in already_processed: already_processed.append('length') outfile.write(' length="%s"' % self.gds_format_integer(self.length, input_name='length')) def exportChildren(self, outfile, level, namespace_='', name_='TreeIntEdge'): for meta_ in self.get_meta(): meta_.export(outfile, level, namespace_, name_='meta') def hasContent_(self): if ( self.meta ): return True else: return False def exportLiteral(self, outfile, level, name_='TreeIntEdge'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): if self.length is not None: showIndent(outfile, level) outfile.write('length = %d,\n' % (self.length,)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('meta=[\n') level += 1 for meta_ in self.meta: showIndent(outfile, level) outfile.write('model_.Meta(\n') meta_.exportLiteral(outfile, level, name_='Meta') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node): self.buildAttributes(node, node.attrib, []) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): value = attrs.get('length') if value is not None and 'length' not in already_processed: already_processed.append('length') try: self.length = int(value) except ValueError, exp: raise_parse_error(node, 'Bad integer attribute: %s' % exp) super(TreeIntEdge, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'meta': type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type') if type_name_ is None: type_name_ = child_.attrib.get('type') if type_name_ is not None: type_names_ = type_name_.split(':') if len(type_names_) == 1: type_name_ = type_names_[0] else: type_name_ = type_names_[1] class_ = globals()[type_name_] obj_ = class_.factory() obj_.build(child_) else: raise NotImplementedError( 'Class not implemented for <meta> element') self.meta.append(obj_) class TreeFloatRootEdge(AbstractRootEdge): """A concrete root edge implementation, with float length.""" subclass = None superclass = AbstractRootEdge def __init__(self, about=None, meta=None, label=None, id=None, length=None, target=None): super(TreeFloatRootEdge, self).__init__(about, meta, label, id, length, target, ) self.length = _cast(float, length) if meta is None: self.meta = [] else: self.meta = meta def factory(*args_, **kwargs_): if TreeFloatRootEdge.subclass: return TreeFloatRootEdge.subclass(*args_, **kwargs_) else: return TreeFloatRootEdge(*args_, **kwargs_) factory = staticmethod(factory) def get_meta(self): return self.meta def set_meta(self, meta): self.meta = meta def add_meta(self, value): self.meta.append(value) def insert_meta(self, index, value): self.meta[index] = value def get_length(self): return self.length def set_length(self, length): self.length = length def export(self, outfile, level, namespace_='', name_='TreeFloatRootEdge', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='TreeFloatRootEdge') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='TreeFloatRootEdge'): super(TreeFloatRootEdge, self).exportAttributes(outfile, level, already_processed, namespace_, name_='TreeFloatRootEdge') if self.length is not None and 'length' not in already_processed: already_processed.append('length') outfile.write(' length="%s"' % self.gds_format_double(self.length, input_name='length')) def exportChildren(self, outfile, level, namespace_='', name_='TreeFloatRootEdge'): for meta_ in self.get_meta(): meta_.export(outfile, level, namespace_, name_='meta') def hasContent_(self): if ( self.meta ): return True else: return False def exportLiteral(self, outfile, level, name_='TreeFloatRootEdge'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): if self.length is not None: showIndent(outfile, level) outfile.write('length = %e,\n' % (self.length,)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('meta=[\n') level += 1 for meta_ in self.meta: showIndent(outfile, level) outfile.write('model_.Meta(\n') meta_.exportLiteral(outfile, level, name_='Meta') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node): self.buildAttributes(node, node.attrib, []) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): value = attrs.get('length') if value is not None and 'length' not in already_processed: already_processed.append('length') try: self.length = float(value) except ValueError, exp: raise ValueError('Bad float/double attribute (length): %s' % exp) super(TreeFloatRootEdge, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'meta': type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type') if type_name_ is None: type_name_ = child_.attrib.get('type') if type_name_ is not None: type_names_ = type_name_.split(':') if len(type_names_) == 1: type_name_ = type_names_[0] else: type_name_ = type_names_[1] class_ = globals()[type_name_] obj_ = class_.factory() obj_.build(child_) else: raise NotImplementedError( 'Class not implemented for <meta> element') self.meta.append(obj_) class TreeFloatEdge(AbstractEdge): """A concrete edge implementation, with float length.""" subclass = None superclass = AbstractEdge def __init__(self, about=None, meta=None, label=None, id=None, source=None, length=None, target=None): super(TreeFloatEdge, self).__init__(about, meta, label, id, source, length, target, ) self.length = _cast(float, length) if meta is None: self.meta = [] else: self.meta = meta def factory(*args_, **kwargs_): if TreeFloatEdge.subclass: return TreeFloatEdge.subclass(*args_, **kwargs_) else: return TreeFloatEdge(*args_, **kwargs_) factory = staticmethod(factory) def get_meta(self): return self.meta def set_meta(self, meta): self.meta = meta def add_meta(self, value): self.meta.append(value) def insert_meta(self, index, value): self.meta[index] = value def get_length(self): return self.length def set_length(self, length): self.length = length def export(self, outfile, level, namespace_='', name_='TreeFloatEdge', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='TreeFloatEdge') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='TreeFloatEdge'): super(TreeFloatEdge, self).exportAttributes(outfile, level, already_processed, namespace_, name_='TreeFloatEdge') if self.length is not None and 'length' not in already_processed: already_processed.append('length') outfile.write(' length="%s"' % self.gds_format_double(self.length, input_name='length')) def exportChildren(self, outfile, level, namespace_='', name_='TreeFloatEdge'): for meta_ in self.get_meta(): meta_.export(outfile, level, namespace_, name_='meta') def hasContent_(self): if ( self.meta ): return True else: return False def exportLiteral(self, outfile, level, name_='TreeFloatEdge'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): if self.length is not None: showIndent(outfile, level) outfile.write('length = %e,\n' % (self.length,)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('meta=[\n') level += 1 for meta_ in self.meta: showIndent(outfile, level) outfile.write('model_.Meta(\n') meta_.exportLiteral(outfile, level, name_='Meta') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node): self.buildAttributes(node, node.attrib, []) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): value = attrs.get('length') if value is not None and 'length' not in already_processed: already_processed.append('length') try: self.length = float(value) except ValueError, exp: raise ValueError('Bad float/double attribute (length): %s' % exp) super(TreeFloatEdge, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'meta': type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type') if type_name_ is None: type_name_ = child_.attrib.get('type') if type_name_ is not None: type_names_ = type_name_.split(':') if len(type_names_) == 1: type_name_ = type_names_[0] else: type_name_ = type_names_[1] class_ = globals()[type_name_] obj_ = class_.factory() obj_.build(child_) else: raise NotImplementedError( 'Class not implemented for <meta> element') self.meta.append(obj_) class StandardObs(AbstractObs): """This is a single cell in a matrix containing a standard observation.""" subclass = None superclass = AbstractObs def __init__(self, about=None, meta=None, label=None, char=None, state=None): super(StandardObs, self).__init__(about, meta, label, char, state, ) self.char = _cast(None, char) self.state = _cast(None, state) if meta is None: self.meta = [] else: self.meta = meta def factory(*args_, **kwargs_): if StandardObs.subclass: return StandardObs.subclass(*args_, **kwargs_) else: return StandardObs(*args_, **kwargs_) factory = staticmethod(factory) def get_meta(self): return self.meta def set_meta(self, meta): self.meta = meta def add_meta(self, value): self.meta.append(value) def insert_meta(self, index, value): self.meta[index] = value def get_char(self): return self.char def set_char(self, char): self.char = char def get_state(self): return self.state def set_state(self, state): self.state = state def export(self, outfile, level, namespace_='', name_='StandardObs', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='StandardObs') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='StandardObs'): super(StandardObs, self).exportAttributes(outfile, level, already_processed, namespace_, name_='StandardObs') outfile.write(' char=%s' % (self.gds_format_string(quote_attrib(self.char).encode(ExternalEncoding), input_name='char'), )) outfile.write(' state=%s' % (self.gds_format_string(quote_attrib(self.state).encode(ExternalEncoding), input_name='state'), )) def exportChildren(self, outfile, level, namespace_='', name_='StandardObs'): for meta_ in self.get_meta(): meta_.export(outfile, level, namespace_, name_='meta') def hasContent_(self): if ( self.meta ): return True else: return False def exportLiteral(self, outfile, level, name_='StandardObs'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): if self.char is not None: showIndent(outfile, level) outfile.write('char = "%s",\n' % (self.char,)) if self.state is not None: showIndent(outfile, level) outfile.write('state = "%s",\n' % (self.state,)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('meta=[\n') level += 1 for meta_ in self.meta: showIndent(outfile, level) outfile.write('model_.Meta(\n') meta_.exportLiteral(outfile, level, name_='Meta') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node): self.buildAttributes(node, node.attrib, []) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): value = attrs.get('char') if value is not None and 'char' not in already_processed: already_processed.append('char') self.char = value value = attrs.get('state') if value is not None and 'state' not in already_processed: already_processed.append('state') self.state = value super(StandardObs, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'meta': type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type') if type_name_ is None: type_name_ = child_.attrib.get('type') if type_name_ is not None: type_names_ = type_name_.split(':') if len(type_names_) == 1: type_name_ = type_names_[0] else: type_name_ = type_names_[1] class_ = globals()[type_name_] obj_ = class_.factory() obj_.build(child_) else: raise NotImplementedError( 'Class not implemented for <meta> element') self.meta.append(obj_) class RNAObs(AbstractObs): """This is a single cell in a matrix containing an RNA nucleotide observation.""" subclass = None superclass = AbstractObs def __init__(self, about=None, meta=None, label=None, char=None, state=None): super(RNAObs, self).__init__(about, meta, label, char, state, ) self.char = _cast(None, char) self.state = _cast(None, state) if meta is None: self.meta = [] else: self.meta = meta def factory(*args_, **kwargs_): if RNAObs.subclass: return RNAObs.subclass(*args_, **kwargs_) else: return RNAObs(*args_, **kwargs_) factory = staticmethod(factory) def get_meta(self): return self.meta def set_meta(self, meta): self.meta = meta def add_meta(self, value): self.meta.append(value) def insert_meta(self, index, value): self.meta[index] = value def get_char(self): return self.char def set_char(self, char): self.char = char def get_state(self): return self.state def set_state(self, state): self.state = state def export(self, outfile, level, namespace_='', name_='RNAObs', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='RNAObs') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='RNAObs'): super(RNAObs, self).exportAttributes(outfile, level, already_processed, namespace_, name_='RNAObs') outfile.write(' char=%s' % (self.gds_format_string(quote_attrib(self.char).encode(ExternalEncoding), input_name='char'), )) outfile.write(' state=%s' % (self.gds_format_string(quote_attrib(self.state).encode(ExternalEncoding), input_name='state'), )) def exportChildren(self, outfile, level, namespace_='', name_='RNAObs'): for meta_ in self.get_meta(): meta_.export(outfile, level, namespace_, name_='meta') def hasContent_(self): if ( self.meta ): return True else: return False def exportLiteral(self, outfile, level, name_='RNAObs'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): if self.char is not None: showIndent(outfile, level) outfile.write('char = "%s",\n' % (self.char,)) if self.state is not None: showIndent(outfile, level) outfile.write('state = "%s",\n' % (self.state,)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('meta=[\n') level += 1 for meta_ in self.meta: showIndent(outfile, level) outfile.write('model_.Meta(\n') meta_.exportLiteral(outfile, level, name_='Meta') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node): self.buildAttributes(node, node.attrib, []) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): value = attrs.get('char') if value is not None and 'char' not in already_processed: already_processed.append('char') self.char = value value = attrs.get('state') if value is not None and 'state' not in already_processed: already_processed.append('state') self.state = value super(RNAObs, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'meta': type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type') if type_name_ is None: type_name_ = child_.attrib.get('type') if type_name_ is not None: type_names_ = type_name_.split(':') if len(type_names_) == 1: type_name_ = type_names_[0] else: type_name_ = type_names_[1] class_ = globals()[type_name_] obj_ = class_.factory() obj_.build(child_) else: raise NotImplementedError( 'Class not implemented for <meta> element') self.meta.append(obj_) class RestrictionObs(AbstractObs): """This is a single cell in a matrix containing a restriction site observation.""" subclass = None superclass = AbstractObs def __init__(self, about=None, meta=None, label=None, char=None, state=None): super(RestrictionObs, self).__init__(about, meta, label, char, state, ) self.char = _cast(None, char) self.state = _cast(None, state) if meta is None: self.meta = [] else: self.meta = meta def factory(*args_, **kwargs_): if RestrictionObs.subclass: return RestrictionObs.subclass(*args_, **kwargs_) else: return RestrictionObs(*args_, **kwargs_) factory = staticmethod(factory) def get_meta(self): return self.meta def set_meta(self, meta): self.meta = meta def add_meta(self, value): self.meta.append(value) def insert_meta(self, index, value): self.meta[index] = value def get_char(self): return self.char def set_char(self, char): self.char = char def get_state(self): return self.state def set_state(self, state): self.state = state def export(self, outfile, level, namespace_='', name_='RestrictionObs', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='RestrictionObs') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='RestrictionObs'): super(RestrictionObs, self).exportAttributes(outfile, level, already_processed, namespace_, name_='RestrictionObs') outfile.write(' char=%s' % (self.gds_format_string(quote_attrib(self.char).encode(ExternalEncoding), input_name='char'), )) outfile.write(' state=%s' % (self.gds_format_string(quote_attrib(self.state).encode(ExternalEncoding), input_name='state'), )) def exportChildren(self, outfile, level, namespace_='', name_='RestrictionObs'): for meta_ in self.get_meta(): meta_.export(outfile, level, namespace_, name_='meta') def hasContent_(self): if ( self.meta ): return True else: return False def exportLiteral(self, outfile, level, name_='RestrictionObs'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): if self.char is not None: showIndent(outfile, level) outfile.write('char = "%s",\n' % (self.char,)) if self.state is not None: showIndent(outfile, level) outfile.write('state = "%s",\n' % (self.state,)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('meta=[\n') level += 1 for meta_ in self.meta: showIndent(outfile, level) outfile.write('model_.Meta(\n') meta_.exportLiteral(outfile, level, name_='Meta') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node): self.buildAttributes(node, node.attrib, []) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): value = attrs.get('char') if value is not None and 'char' not in already_processed: already_processed.append('char') self.char = value value = attrs.get('state') if value is not None and 'state' not in already_processed: already_processed.append('state') self.state = value super(RestrictionObs, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'meta': type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type') if type_name_ is None: type_name_ = child_.attrib.get('type') if type_name_ is not None: type_names_ = type_name_.split(':') if len(type_names_) == 1: type_name_ = type_names_[0] else: type_name_ = type_names_[1] class_ = globals()[type_name_] obj_ = class_.factory() obj_.build(child_) else: raise NotImplementedError( 'Class not implemented for <meta> element') self.meta.append(obj_) class AAObs(AbstractObs): """This is a single cell in a matrix containing an amino acid observation.""" subclass = None superclass = AbstractObs def __init__(self, about=None, meta=None, label=None, char=None, state=None): super(AAObs, self).__init__(about, meta, label, char, state, ) self.char = _cast(None, char) self.state = _cast(None, state) if meta is None: self.meta = [] else: self.meta = meta def factory(*args_, **kwargs_): if AAObs.subclass: return AAObs.subclass(*args_, **kwargs_) else: return AAObs(*args_, **kwargs_) factory = staticmethod(factory) def get_meta(self): return self.meta def set_meta(self, meta): self.meta = meta def add_meta(self, value): self.meta.append(value) def insert_meta(self, index, value): self.meta[index] = value def get_char(self): return self.char def set_char(self, char): self.char = char def get_state(self): return self.state def set_state(self, state): self.state = state def export(self, outfile, level, namespace_='', name_='AAObs', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='AAObs') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='AAObs'): super(AAObs, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AAObs') outfile.write(' char=%s' % (self.gds_format_string(quote_attrib(self.char).encode(ExternalEncoding), input_name='char'), )) outfile.write(' state=%s' % (self.gds_format_string(quote_attrib(self.state).encode(ExternalEncoding), input_name='state'), )) def exportChildren(self, outfile, level, namespace_='', name_='AAObs'): for meta_ in self.get_meta(): meta_.export(outfile, level, namespace_, name_='meta') def hasContent_(self): if ( self.meta ): return True else: return False def exportLiteral(self, outfile, level, name_='AAObs'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): if self.char is not None: showIndent(outfile, level) outfile.write('char = "%s",\n' % (self.char,)) if self.state is not None: showIndent(outfile, level) outfile.write('state = "%s",\n' % (self.state,)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('meta=[\n') level += 1 for meta_ in self.meta: showIndent(outfile, level) outfile.write('model_.Meta(\n') meta_.exportLiteral(outfile, level, name_='Meta') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node): self.buildAttributes(node, node.attrib, []) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): value = attrs.get('char') if value is not None and 'char' not in already_processed: already_processed.append('char') self.char = value value = attrs.get('state') if value is not None and 'state' not in already_processed: already_processed.append('state') self.state = value super(AAObs, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'meta': type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type') if type_name_ is None: type_name_ = child_.attrib.get('type') if type_name_ is not None: type_names_ = type_name_.split(':') if len(type_names_) == 1: type_name_ = type_names_[0] else: type_name_ = type_names_[1] class_ = globals()[type_name_] obj_ = class_.factory() obj_.build(child_) else: raise NotImplementedError( 'Class not implemented for <meta> element') self.meta.append(obj_) class DNAObs(AbstractObs): """This is a single cell in a matrix containing a nucleotide observation.""" subclass = None superclass = AbstractObs def __init__(self, about=None, meta=None, label=None, char=None, state=None): super(DNAObs, self).__init__(about, meta, label, char, state, ) self.char = _cast(None, char) self.state = _cast(None, state) if meta is None: self.meta = [] else: self.meta = meta def factory(*args_, **kwargs_): if DNAObs.subclass: return DNAObs.subclass(*args_, **kwargs_) else: return DNAObs(*args_, **kwargs_) factory = staticmethod(factory) def get_meta(self): return self.meta def set_meta(self, meta): self.meta = meta def add_meta(self, value): self.meta.append(value) def insert_meta(self, index, value): self.meta[index] = value def get_char(self): return self.char def set_char(self, char): self.char = char def get_state(self): return self.state def set_state(self, state): self.state = state def export(self, outfile, level, namespace_='', name_='DNAObs', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='DNAObs') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='DNAObs'): super(DNAObs, self).exportAttributes(outfile, level, already_processed, namespace_, name_='DNAObs') outfile.write(' char=%s' % (self.gds_format_string(quote_attrib(self.char).encode(ExternalEncoding), input_name='char'), )) outfile.write(' state=%s' % (self.gds_format_string(quote_attrib(self.state).encode(ExternalEncoding), input_name='state'), )) def exportChildren(self, outfile, level, namespace_='', name_='DNAObs'): for meta_ in self.get_meta(): meta_.export(outfile, level, namespace_, name_='meta') def hasContent_(self): if ( self.meta ): return True else: return False def exportLiteral(self, outfile, level, name_='DNAObs'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): if self.char is not None: showIndent(outfile, level) outfile.write('char = "%s",\n' % (self.char,)) if self.state is not None: showIndent(outfile, level) outfile.write('state = "%s",\n' % (self.state,)) def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('meta=[\n') level += 1 for meta_ in self.meta: showIndent(outfile, level) outfile.write('model_.Meta(\n') meta_.exportLiteral(outfile, level, name_='Meta') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') def build(self, node): self.buildAttributes(node, node.attrib, []) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): value = attrs.get('char') if value is not None and 'char' not in already_processed: already_processed.append('char') self.char = value value = attrs.get('state') if value is not None and 'state' not in already_processed: already_processed.append('state') self.state = value super(DNAObs, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'meta': type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type') if type_name_ is None: type_name_ = child_.attrib.get('type') if type_name_ is not None: type_names_ = type_name_.split(':') if len(type_names_) == 1: type_name_ = type_names_[0] else: type_name_ = type_names_[1] class_ = globals()[type_name_] obj_ = class_.factory() obj_.build(child_) else: raise NotImplementedError( 'Class not implemented for <meta> element') self.meta.append(obj_) class AbstractChar(IDTagged): """The AbstractChar type is the superclass for a column definition, which may have a "states" attribute that refers to an AbstractStates element, a codon attribute of type CodonPosition and an id attribute that may be an actual id (e.g. for categorical matrices where observations explicitly refer to a column definition) or an integer for sequence matrices.""" subclass = None superclass = IDTagged def __init__(self, about=None, meta=None, label=None, id=None, tokens=None, states=None, codon=None, valueOf_=None, mixedclass_=None, content_=None): super(AbstractChar, self).__init__(about, meta, label, id, valueOf_, mixedclass_, content_, ) self.tokens = _cast(None, tokens) self.states = _cast(None, states) self.codon = _cast(None, codon) self.valueOf_ = valueOf_ if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if AbstractChar.subclass: return AbstractChar.subclass(*args_, **kwargs_) else: return AbstractChar(*args_, **kwargs_) factory = staticmethod(factory) def get_tokens(self): return self.tokens def set_tokens(self, tokens): self.tokens = tokens def validate_MSTokenLength(self, value): pass def get_states(self): return self.states def set_states(self, states): self.states = states def get_codon(self): return self.codon def set_codon(self, codon): self.codon = codon def validate_CodonPosition(self, value): pass def get_valueOf_(self): return self.valueOf_ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='AbstractChar', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='AbstractChar') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') outfile.write(' xsi:type="AbstractChar"') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='AbstractChar'): super(AbstractChar, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractChar') if self.tokens is not None and 'tokens' not in already_processed: already_processed.append('tokens') outfile.write(' tokens=%s' % (quote_attrib(self.tokens), )) if self.states is not None and 'states' not in already_processed: already_processed.append('states') outfile.write(' states=%s' % (self.gds_format_string(quote_attrib(self.states).encode(ExternalEncoding), input_name='states'), )) if self.codon is not None and 'codon' not in already_processed: already_processed.append('codon') outfile.write(' codon=%s' % (quote_attrib(self.codon), )) def exportChildren(self, outfile, level, namespace_='', name_='AbstractChar'): super(AbstractChar, self).exportChildren(outfile, level, namespace_, name_) def hasContent_(self): if ( self.valueOf_ or super(AbstractChar, self).hasContent_() ): return True else: return False def exportLiteral(self, outfile, level, name_='AbstractChar'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): if self.tokens is not None: showIndent(outfile, level) outfile.write('tokens = %d,\n' % (self.tokens,)) if self.states is not None: showIndent(outfile, level) outfile.write('states = "%s",\n' % (self.states,)) if self.codon is not None: showIndent(outfile, level) outfile.write('codon = %d,\n' % (self.codon,)) super(AbstractChar, self).exportLiteralAttributes(outfile, level, name_) def exportLiteralChildren(self, outfile, level, name_): super(AbstractChar, self).exportLiteralChildren(outfile, level, name_) showIndent(outfile, level) outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,)) def build(self, node): self.buildAttributes(node, node.attrib, []) self.valueOf_ = get_all_text_(node) if node.text is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', node.text) self.content_.append(obj_) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): value = attrs.get('tokens') if value is not None and 'tokens' not in already_processed: already_processed.append('tokens') self.tokens = value self.validate_MSTokenLength(self.tokens) value = attrs.get('states') if value is not None and 'states' not in already_processed: already_processed.append('states') self.states = value value = attrs.get('codon') if value is not None and 'codon' not in already_processed: already_processed.append('codon') self.codon = value self.validate_CodonPosition(self.codon) super(AbstractChar, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if not from_subclass and child_.tail is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.tail) self.content_.append(obj_) super(AbstractChar, self).buildChildren(child_, nodeName_, True) pass class AbstractStates(IDTagged): """A container for a set of AbstractState elements.""" subclass = None superclass = IDTagged def __init__(self, about=None, meta=None, label=None, id=None, state=None, polymorphic_state_set=None, uncertain_state_set=None, set=None, valueOf_=None, mixedclass_=None, content_=None): super(AbstractStates, self).__init__(about, meta, label, id, valueOf_, mixedclass_, content_, ) if state is None: self.state = [] else: self.state = state if polymorphic_state_set is None: self.polymorphic_state_set = [] else: self.polymorphic_state_set = polymorphic_state_set if uncertain_state_set is None: self.uncertain_state_set = [] else: self.uncertain_state_set = uncertain_state_set if set is None: self.set = [] else: self.set = set self.valueOf_ = valueOf_ if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if AbstractStates.subclass: return AbstractStates.subclass(*args_, **kwargs_) else: return AbstractStates(*args_, **kwargs_) factory = staticmethod(factory) def get_state(self): return self.state def set_state(self, state): self.state = state def add_state(self, value): self.state.append(value) def insert_state(self, index, value): self.state[index] = value def get_polymorphic_state_set(self): return self.polymorphic_state_set def set_polymorphic_state_set(self, polymorphic_state_set): self.polymorphic_state_set = polymorphic_state_set def add_polymorphic_state_set(self, value): self.polymorphic_state_set.append(value) def insert_polymorphic_state_set(self, index, value): self.polymorphic_state_set[index] = value def get_uncertain_state_set(self): return self.uncertain_state_set def set_uncertain_state_set(self, uncertain_state_set): self.uncertain_state_set = uncertain_state_set def add_uncertain_state_set(self, value): self.uncertain_state_set.append(value) def insert_uncertain_state_set(self, index, value): self.uncertain_state_set[index] = value def get_set(self): return self.set def set_set(self, set): self.set = set def add_set(self, value): self.set.append(value) def insert_set(self, index, value): self.set[index] = value def get_valueOf_(self): return self.valueOf_ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='AbstractStates', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='AbstractStates') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') outfile.write(' xsi:type="AbstractStates"') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='AbstractStates'): super(AbstractStates, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractStates') def exportChildren(self, outfile, level, namespace_='', name_='AbstractStates'): super(AbstractStates, self).exportChildren(outfile, level, namespace_, name_) for item_ in self.content_: item_.export(outfile, level, item_.name, namespace_) def hasContent_(self): if ( self.state or self.polymorphic_state_set or self.uncertain_state_set or self.set or self.valueOf_ or super(AbstractStates, self).hasContent_() ): return True else: return False def exportLiteral(self, outfile, level, name_='AbstractStates'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): super(AbstractStates, self).exportLiteralAttributes(outfile, level, name_) def exportLiteralChildren(self, outfile, level, name_): super(AbstractStates, self).exportLiteralChildren(outfile, level, name_) showIndent(outfile, level) outfile.write('content_ = [\n') for item_ in self.content_: item_.exportLiteral(outfile, level, name_) showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('content_ = [\n') for item_ in self.content_: item_.exportLiteral(outfile, level, name_) showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('content_ = [\n') for item_ in self.content_: item_.exportLiteral(outfile, level, name_) showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('content_ = [\n') for item_ in self.content_: item_.exportLiteral(outfile, level, name_) showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,)) def build(self, node): self.buildAttributes(node, node.attrib, []) self.valueOf_ = get_all_text_(node) if node.text is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', node.text) self.content_.append(obj_) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): super(AbstractStates, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'state': type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type') if type_name_ is None: type_name_ = child_.attrib.get('type') if type_name_ is not None: type_names_ = type_name_.split(':') if len(type_names_) == 1: type_name_ = type_names_[0] else: type_name_ = type_names_[1] class_ = globals()[type_name_] obj_ = class_.factory() obj_.build(child_) else: raise NotImplementedError( 'Class not implemented for <state> element') obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'state', obj_) self.content_.append(obj_) if hasattr(self, 'add_state'): self.add_state(obj_.value) elif hasattr(self, 'set_state'): self.set_state(obj_.value) elif nodeName_ == 'polymorphic_state_set': type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type') if type_name_ is None: type_name_ = child_.attrib.get('type') if type_name_ is not None: type_names_ = type_name_.split(':') if len(type_names_) == 1: type_name_ = type_names_[0] else: type_name_ = type_names_[1] class_ = globals()[type_name_] obj_ = class_.factory() obj_.build(child_) else: raise NotImplementedError( 'Class not implemented for <polymorphic_state_set> element') obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'polymorphic_state_set', obj_) self.content_.append(obj_) if hasattr(self, 'add_polymorphic_state_set'): self.add_polymorphic_state_set(obj_.value) elif hasattr(self, 'set_polymorphic_state_set'): self.set_polymorphic_state_set(obj_.value) elif nodeName_ == 'uncertain_state_set': type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type') if type_name_ is None: type_name_ = child_.attrib.get('type') if type_name_ is not None: type_names_ = type_name_.split(':') if len(type_names_) == 1: type_name_ = type_names_[0] else: type_name_ = type_names_[1] class_ = globals()[type_name_] obj_ = class_.factory() obj_.build(child_) else: raise NotImplementedError( 'Class not implemented for <uncertain_state_set> element') obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'uncertain_state_set', obj_) self.content_.append(obj_) if hasattr(self, 'add_uncertain_state_set'): self.add_uncertain_state_set(obj_.value) elif hasattr(self, 'set_uncertain_state_set'): self.set_uncertain_state_set(obj_.value) elif nodeName_ == 'set': obj_ = StateSet.factory() obj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'set', obj_) self.content_.append(obj_) if hasattr(self, 'add_set'): self.add_set(obj_.value) elif hasattr(self, 'set_set'): self.set_set(obj_.value) if not from_subclass and child_.tail is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.tail) self.content_.append(obj_) super(AbstractStates, self).buildChildren(child_, nodeName_, True) class AbstractState(IDTagged): """The AbstractState type is the super-class for a state definition. The element has a required symbol attribute that in restricted concrete subclasses must be of a sensible type such as a single IUPAC character. It may enclose zero or more AbstractMapping elements to resolve ambiguities.""" subclass = None superclass = IDTagged def __init__(self, about=None, meta=None, label=None, id=None, symbol=None, valueOf_=None, mixedclass_=None, content_=None): super(AbstractState, self).__init__(about, meta, label, id, valueOf_, mixedclass_, content_, ) self.symbol = _cast(None, symbol) self.valueOf_ = valueOf_ if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ self.valueOf_ = valueOf_ def factory(*args_, **kwargs_): if AbstractState.subclass: return AbstractState.subclass(*args_, **kwargs_) else: return AbstractState(*args_, **kwargs_) factory = staticmethod(factory) def get_symbol(self): return self.symbol def set_symbol(self, symbol): self.symbol = symbol def get_valueOf_(self): return self.valueOf_ def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_ def export(self, outfile, level, namespace_='', name_='AbstractState', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, [], namespace_, name_='AbstractState') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') outfile.write(' xsi:type="AbstractState"') if self.hasContent_(): outfile.write('>\n') self.exportChildren(outfile, level + 1, namespace_, name_) showIndent(outfile, level) outfile.write('</%s%s>\n' % (namespace_, name_)) else: outfile.write('/>\n') def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='AbstractState'): super(AbstractState, self).exportAttributes(outfile, level, already_processed, namespace_, name_='AbstractState') outfile.write(' symbol=%s' % (quote_attrib(self.symbol), )) def exportChildren(self, outfile, level, namespace_='', name_='AbstractState'): super(AbstractState, self).exportChildren(outfile, level, namespace_, name_) def hasContent_(self): if ( self.valueOf_ or super(AbstractState, self).hasContent_() ): return True else: return False def exportLiteral(self, outfile, level, name_='AbstractState'): level += 1 self.exportLiteralAttributes(outfile, level, name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_) def exportLiteralAttributes(self, outfile, level, name_): if self.symbol is not None: showIndent(outfile, level) outfile.write('symbol = %s,\n' % (self.symbol,)) super(AbstractState, self).exportLiteralAttributes(outfile, level, name_) def exportLiteralChildren(self, outfile, level, name_): super(AbstractState, self).exportLiteralChildren(outfile, level, name_) showIndent(outfile, level) outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,)) def build(self, node): self.buildAttributes(node, node.attrib, []) self.valueOf_ = get_all_text_(node) if node.text is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', node.text) self.content_.append(obj_) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) def buildAttributes(self, node, attrs, already_processed): value = attrs.get('symbol') if value is not None and 'symbol' not in already_processed: already_processed.append('symbol') self.symbol = value super(AbstractState, self).buildAttributes(node, attrs, already_processed) def buildChildren(self, child_, nodeName_, from_subclass=False): if not from_subclass and child_.tail is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.tail) self.content_.append(obj_) super(AbstractState, self).buildChildren(child_, nodeName_, True) pass class ContinuousChar(AbstractChar):
def buildChildren(self, child_, nodeName_, from_subclass=False): pass
10f2a4b3101435822c472af9b202a5a0bb496366 /local1/tlutelli/issta_data/temp/all_python//python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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 4212, 12, 2890, 16, 1151, 67, 16, 7553, 67, 16, 628, 67, 10678, 33, 8381, 4672, 1342, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
self.http = ProxyConnection(host)
if proxy: self.http = ProxyConnection(host, proxy) else: self.http = httplib.HTTPConnection(host)
def __init__(self, host, username, password, path='/gallery/gallery_remote2.php'): self.host = host self.path = path self.cookies = {} self.http = ProxyConnection(host) self.login(username, password)
56e4874e187f2d09715c3c28c2bc3a967717ae39 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/56e4874e187f2d09715c3c28c2bc3a967717ae39/gallery.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1479, 16, 2718, 16, 2201, 16, 589, 2218, 19, 21454, 19, 21454, 67, 7222, 22, 18, 2684, 11, 4672, 365, 18, 2564, 273, 1479, 365, 18, 803, 273, 589, 365, 18, 16240, 273, 2618, 225, 309, 2889, 30, 365, 18, 2505, 273, 7659, 1952, 12, 2564, 16, 2889, 13, 469, 30, 365, 18, 2505, 273, 15851, 6673, 18, 3693, 1952, 12, 2564, 13, 365, 18, 5819, 12, 5053, 16, 2201, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1479, 16, 2718, 16, 2201, 16, 589, 2218, 19, 21454, 19, 21454, 67, 7222, 22, 18, 2684, 11, 4672, 365, 18, 2564, 273, 1479, 365, 18, 803, 273, 589, 365, 18, 16240, 273, 2618, 225, 309, 2889, 30, 365, 18, 2505, 273, 7659, 1952, 12, 2564, 16, 2889, 13, 469, 30, 365, 18, 2505, 273, 15851, 6673, 18, 3693, 1952, 12, 2564, 13, 365, 18, 5819, 12, 5053, 16, 2201, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
if must_quote_body:
if is_base64: line = line + 'base64\n' elif must_quote_body:
def mimify_part(ifile, ofile, is_mime): '''Convert an 8bit part of a MIME mail message to quoted-printable.''' has_cte = is_qp = 0 multipart = None must_quote_body = must_quote_header = has_iso_chars = 0 header = [] header_end = '' message = [] message_end = '' # read header hfile = HeaderFile(ifile) while 1: line = hfile.readline() if not line: break if not must_quote_header and iso_char.search(line) >= 0: must_quote_header = 1 if mv.match(line) >= 0: is_mime = 1 if cte.match(line) >= 0: has_cte = 1 if qp.match(line) >= 0: is_qp = 1 if mp.match(line) >= 0: multipart = '--' + mp.group(1) if he.match(line) >= 0: header_end = line break header.append(line) # read body while 1: line = ifile.readline() if not line: break if multipart: if line == multipart + '--\n': message_end = line break if line == multipart + '\n': message_end = line break if is_qp: while line[-2:] == '=\n': line = line[:-2] newline = ifile.readline() if newline[:len(QUOTE)] == QUOTE: newline = newline[len(QUOTE):] line = line + newline line = mime_decode(line) message.append(line) if not has_iso_chars: if iso_char.search(line) >= 0: has_iso_chars = must_quote_body = 1 if not must_quote_body: if len(line) > MAXLEN: must_quote_body = 1 # convert and output header and body for line in header: if must_quote_header: line = mime_encode_header(line) if chrset.match(line) >= 0: if has_iso_chars: # change us-ascii into iso-8859-1 if string.lower(chrset.group(2)) == 'us-ascii': line = chrset.group(1) + \ CHARSET + chrset.group(3) else: # change iso-8859-* into us-ascii line = chrset.group(1) + 'us-ascii' + chrset.group(3) if has_cte and cte.match(line) >= 0: line = 'Content-Transfer-Encoding: ' if must_quote_body: line = line + 'quoted-printable\n' else: line = line + '7bit\n' ofile.write(line) if (must_quote_header or must_quote_body) and not is_mime: ofile.write('Mime-Version: 1.0\n') ofile.write('Content-Type: text/plain; ') if has_iso_chars: ofile.write('charset="%s"\n' % CHARSET) else: ofile.write('charset="us-ascii"\n') if must_quote_body and not has_cte: ofile.write('Content-Transfer-Encoding: quoted-printable\n') ofile.write(header_end) for line in message: if must_quote_body: line = mime_encode(line, 0) ofile.write(line) ofile.write(message_end) line = message_end while multipart: if line == multipart + '--\n': return if line == multipart + '\n': nifile = File(ifile, multipart) mimify_part(nifile, ofile, 1) line = nifile.peek ofile.write(line) continue
7b5de9d620238c21b1b53805808b92f36b38335f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/7b5de9d620238c21b1b53805808b92f36b38335f/mimify.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20369, 1164, 67, 2680, 12, 430, 398, 16, 434, 398, 16, 353, 67, 11757, 4672, 9163, 2723, 392, 1725, 3682, 1087, 434, 279, 13195, 4791, 883, 358, 9298, 17, 1188, 429, 1093, 6309, 711, 67, 299, 73, 273, 353, 67, 14166, 273, 374, 10263, 273, 599, 1297, 67, 6889, 67, 3432, 273, 1297, 67, 6889, 67, 3374, 273, 711, 67, 9699, 67, 7549, 273, 374, 225, 1446, 273, 5378, 1446, 67, 409, 273, 875, 883, 273, 5378, 883, 67, 409, 273, 875, 468, 855, 1446, 366, 768, 273, 4304, 812, 12, 430, 398, 13, 1323, 404, 30, 980, 273, 366, 768, 18, 896, 1369, 1435, 309, 486, 980, 30, 898, 309, 486, 1297, 67, 6889, 67, 3374, 471, 8702, 67, 3001, 18, 3072, 12, 1369, 13, 1545, 374, 30, 1297, 67, 6889, 67, 3374, 273, 404, 309, 7701, 18, 1916, 12, 1369, 13, 1545, 374, 30, 353, 67, 11757, 273, 404, 309, 276, 736, 18, 1916, 12, 1369, 13, 1545, 374, 30, 711, 67, 299, 73, 273, 404, 309, 22859, 18, 1916, 12, 1369, 13, 1545, 374, 30, 353, 67, 14166, 273, 404, 309, 6749, 18, 1916, 12, 1369, 13, 1545, 374, 30, 10263, 273, 16979, 397, 6749, 18, 1655, 12, 21, 13, 309, 3904, 18, 1916, 12, 1369, 13, 1545, 374, 30, 1446, 67, 409, 273, 980, 898, 1446, 18, 6923, 12, 1369, 13, 225, 468, 855, 1417, 1323, 404, 30, 980, 273, 309, 398, 18, 896, 1369, 1435, 309, 486, 980, 30, 898, 309, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20369, 1164, 67, 2680, 12, 430, 398, 16, 434, 398, 16, 353, 67, 11757, 4672, 9163, 2723, 392, 1725, 3682, 1087, 434, 279, 13195, 4791, 883, 358, 9298, 17, 1188, 429, 1093, 6309, 711, 67, 299, 73, 273, 353, 67, 14166, 273, 374, 10263, 273, 599, 1297, 67, 6889, 67, 3432, 273, 1297, 67, 6889, 67, 3374, 273, 711, 67, 9699, 67, 7549, 273, 374, 225, 1446, 273, 5378, 1446, 67, 409, 273, 875, 883, 273, 5378, 883, 67, 409, 273, 875, 468, 855, 1446, 366, 768, 273, 4304, 812, 12, 430, 398, 13, 1323, 404, 30, 980, 273, 366, 768, 18, 896, 1369, 1435, 309, 486, 980, 30, 898, 309, 486, 1297, 67, 6889, 67, 3374, 471, 2 ]
print 'File has SHA1 hash %s'%hash()
print 'File has SHA1 hash %s'%hash
def write_version_file(self, builder, args): force = False while args: word = args[0] args = args[1:] if word in ('-f', '-force'): force = True elif word.startswith('-'): print "Unexpected switch '%s'"%word self.print_syntax() return 2 else: print "Unexpected '%s'"%word self.print_syntax() return 2
59f7ca004baa26814312930a617a413f4bebd1f4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4427/59f7ca004baa26814312930a617a413f4bebd1f4/commands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 1589, 67, 768, 12, 2890, 16, 2089, 16, 833, 4672, 2944, 273, 1083, 1323, 833, 30, 2076, 273, 833, 63, 20, 65, 833, 273, 833, 63, 21, 26894, 309, 2076, 316, 7707, 17, 74, 2187, 2400, 5734, 11, 4672, 2944, 273, 1053, 1327, 2076, 18, 17514, 1918, 2668, 6627, 4672, 1172, 315, 7762, 1620, 1995, 87, 4970, 9, 1095, 365, 18, 1188, 67, 14308, 1435, 327, 576, 469, 30, 1172, 315, 7762, 1995, 87, 4970, 9, 1095, 365, 18, 1188, 67, 14308, 1435, 327, 576, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 1589, 67, 768, 12, 2890, 16, 2089, 16, 833, 4672, 2944, 273, 1083, 1323, 833, 30, 2076, 273, 833, 63, 20, 65, 833, 273, 833, 63, 21, 26894, 309, 2076, 316, 7707, 17, 74, 2187, 2400, 5734, 11, 4672, 2944, 273, 1053, 1327, 2076, 18, 17514, 1918, 2668, 6627, 4672, 1172, 315, 7762, 1620, 1995, 87, 4970, 9, 1095, 365, 18, 1188, 67, 14308, 1435, 327, 576, 469, 30, 1172, 315, 7762, 1995, 87, 4970, 9, 1095, 365, 18, 1188, 67, 14308, 1435, 327, 576, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
if not ymin:
if ymin is None:
def __init__(self, v, xmin=None, xmax=None, ymin=None, ymax=None, **kwds): w = [] for x in v: if not isinstance(x, plot.Graphics): x = plot.plot(x, xmin=xmin, xmax=xmax) w.append(x) if len(w) == 0: w = [plot.Graphics()] self.__frames = w G = w[0] if not xmin: xmin = G.xmin() if not xmax: xmax = G.xmax() if not ymin: ymin = G.ymin() if not ymax: ymax = G.ymax() self.__xmin = xmin self.__xmax = xmax self.__ymin = ymin self.__ymax = ymax self.__kwds = kwds
9c81fcd897d50f9a2961371139896f44cf249289 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/9c81fcd897d50f9a2961371139896f44cf249289/animate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 331, 16, 13777, 33, 7036, 16, 14016, 33, 7036, 16, 15763, 33, 7036, 16, 15275, 33, 7036, 16, 2826, 25577, 4672, 341, 273, 5378, 364, 619, 316, 331, 30, 309, 486, 1549, 12, 92, 16, 3207, 18, 17558, 4672, 619, 273, 3207, 18, 4032, 12, 92, 16, 13777, 33, 92, 1154, 16, 14016, 33, 92, 1896, 13, 341, 18, 6923, 12, 92, 13, 309, 562, 12, 91, 13, 422, 374, 30, 341, 273, 306, 4032, 18, 17558, 1435, 65, 365, 16186, 10278, 273, 341, 611, 273, 341, 63, 20, 65, 309, 486, 13777, 30, 13777, 273, 611, 18, 92, 1154, 1435, 309, 486, 14016, 30, 14016, 273, 611, 18, 92, 1896, 1435, 309, 15763, 353, 599, 30, 15763, 273, 611, 18, 93, 1154, 1435, 309, 486, 15275, 30, 15275, 273, 611, 18, 93, 1896, 1435, 365, 16186, 92, 1154, 273, 13777, 365, 16186, 92, 1896, 273, 14016, 365, 16186, 93, 1154, 273, 15763, 365, 16186, 93, 1896, 273, 15275, 365, 16186, 25577, 273, 17149, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 331, 16, 13777, 33, 7036, 16, 14016, 33, 7036, 16, 15763, 33, 7036, 16, 15275, 33, 7036, 16, 2826, 25577, 4672, 341, 273, 5378, 364, 619, 316, 331, 30, 309, 486, 1549, 12, 92, 16, 3207, 18, 17558, 4672, 619, 273, 3207, 18, 4032, 12, 92, 16, 13777, 33, 92, 1154, 16, 14016, 33, 92, 1896, 13, 341, 18, 6923, 12, 92, 13, 309, 562, 12, 91, 13, 422, 374, 30, 341, 273, 306, 4032, 18, 17558, 1435, 65, 365, 16186, 10278, 273, 341, 611, 273, 341, 63, 20, 65, 309, 486, 13777, 30, 13777, 273, 611, 18, 92, 1154, 1435, 309, 486, 14016, 30, 14016, 273, 611, 18, 92, 1896, 1435, 2 ]
print path
def getRootPath(): path = os.path.dirname(os.path.abspath(__file__)) if os.path.isdir(os.path.join(path, "media")): print path return path path = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)),"..\\..")) if os.path.isdir(os.path.join(path, "media")): print path return path
1464f29b0b316177573c8b2d1f8c3b5df5ec9bbf /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/808/1464f29b0b316177573c8b2d1f8c3b5df5ec9bbf/svn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18863, 13332, 589, 273, 1140, 18, 803, 18, 12287, 12, 538, 18, 803, 18, 5113, 803, 12, 972, 768, 972, 3719, 309, 1140, 18, 803, 18, 291, 1214, 12, 538, 18, 803, 18, 5701, 12, 803, 16, 315, 5829, 6, 3719, 30, 327, 589, 589, 273, 1140, 18, 803, 18, 5113, 803, 12, 538, 18, 803, 18, 5701, 12, 538, 18, 803, 18, 12287, 12, 538, 18, 803, 18, 5113, 803, 12, 972, 768, 972, 13, 3631, 6, 838, 1695, 18460, 3719, 309, 1140, 18, 803, 18, 291, 1214, 12, 538, 18, 803, 18, 5701, 12, 803, 16, 315, 5829, 6, 3719, 30, 327, 589, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18863, 13332, 589, 273, 1140, 18, 803, 18, 12287, 12, 538, 18, 803, 18, 5113, 803, 12, 972, 768, 972, 3719, 309, 1140, 18, 803, 18, 291, 1214, 12, 538, 18, 803, 18, 5701, 12, 803, 16, 315, 5829, 6, 3719, 30, 327, 589, 589, 273, 1140, 18, 803, 18, 5113, 803, 12, 538, 18, 803, 18, 5701, 12, 538, 18, 803, 18, 12287, 12, 538, 18, 803, 18, 5113, 803, 12, 972, 768, 972, 13, 3631, 6, 838, 1695, 18460, 3719, 309, 1140, 18, 803, 18, 291, 1214, 12, 538, 18, 803, 18, 5701, 12, 803, 16, 315, 5829, 6, 3719, 30, 327, 589, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
share.put(updateCallback=callback)
try: share.put(updateCallback=callback) except: share.destroy() raise
def publish(collection, account, classesToInclude=None, publishType = 'collection', attrsToExclude=None, displayName=None, updateCallback=None): """ Publish a collection, automatically determining which conduits/formats to use, and how many @type collection: pim.ContentCollection @param collection: The collection to publish @type account: WebDAVAccount @param account: The sharing (WebDAV) account to use @type classesToInclude: list of str @param classesToInclude: An optional list of dotted class names; if provided, then only items matching those classes will be shared @type attrsToExclude: list of str @param attrsToExclude: An optional list of attribute names to skip when publishing @type displayName: unicode @param displayName: An optional name to use for publishing; if not provided, the collection's displayName will be used as a starting point. In either case, to avoid collisions with existing collections, '-1', '-2', etc., may be appended. @type updateCallback: method @param updateCallback: An optional callback method, which will get called periodically during the publishing process. If the callback returns True, the publishing operation will stop """ try: totalWork = len(collection) except TypeError: # Some collection classes don't support len( ) totalWork = len(list(collection)) if updateCallback: progressMonitor = ProgressMonitor(totalWork, updateCallback) callback = progressMonitor.callback else: progressMonitor = None callback = None view = collection.itsView conduit = WebDAVConduit(itsView=view, account=account) path = account.path.strip("/") # Interrogate the server associated with the account location = account.getLocation() if not location.endswith("/"): location += "/" handle = conduit._getServerHandle() resource = handle.getResource(location) logger.debug('Examining %s ...', location.encode('utf8', 'replace')) exists = handle.blockUntil(resource.exists) if not exists: logger.debug("...doesn't exist") raise NotFound(_(u"%(location)s does not exist") % {'location': location}) isCalendar = handle.blockUntil(resource.isCalendar) logger.debug('...Calendar? %s', isCalendar) isCollection = handle.blockUntil(resource.isCollection) logger.debug('...Collection? %s', isCollection) response = handle.blockUntil(resource.options) dav = response.headers.getHeader('DAV') logger.debug('...DAV: %s', dav) allowed = response.headers.getHeader('Allow') logger.debug('...Allow: %s', allowed) supportsTickets = handle.blockUntil(resource.supportsTickets) logger.debug('...Tickets?: %s', supportsTickets) conduit.delete(True) # Clean up the temporary conduit # Prepare the share objects shares = [] try: if isCalendar: # We've been handed a calendar directly. Just publish directly # into this calendar collection rather than making a new one. # Create a CalDAV share with empty sharename, doing a GET and PUT share = _newOutboundShare(view, collection, classesToInclude=classesToInclude, shareName=u"", account=account, useCalDAV=True) try: collection.shares.append(share, 'main') except ValueError: # There is already a 'main' share for this collection collection.shares.append(share) if attrsToExclude: share.filterAttributes = attrsToExclude shares.append(share) share.displayName = collection.displayName share.sync(updateCallback=callback) else: # the collection should be published # determine a share name existing = getExistingResources(account) displayName = displayName or collection.displayName shareName = displayName alias = 'main' # See if there are any non-ascii characters, if so, just use UUID try: shareName.encode('ascii') pattern = re.compile('[^A-Za-z0-9]') shareName = re.sub(pattern, "_", shareName) except UnicodeEncodeError: shareName = unicode(collection.itsUUID) shareName = _uniqueName(shareName, existing) if ('calendar-access' in dav or 'MKCALENDAR' in allowed): # We're speaking to a CalDAV server # should this collection live in the (alpha4 hack for freebusy) # freebusy subcollection? sharing_ns = schema.ns('osaf.sharing', view) inFreeBusy = False fbexists = False # create the freebusy collection if it doesn't already exist if (publishType == 'freebusy' or collection in schema.ns('osaf.pim', view).mine.sources): fbresource = handle.getResource(location + 'freebusy/') fbexists = handle.blockUntil(fbresource.exists) if not fbexists: try: fbresource = handle.blockUntil( resource.createCollection, 'freebusy') fbexists = True except: pass if fbexists: inFreeBusy = True if publishType == 'freebusy': if not fbexists: raise SharingError(_(u"Could not create freebusy collection")) share = Share(itsView=view) share.conduit = CalDAVConduit(itsView=view, account=account, shareName = 'freebusy') share.conduit.createFreeBusyTicket() sharing_ns.prefs.freeBusyShare = share sharing_ns.prefs.freeBusyAccount = account published = sharing_ns.publishedFreeBusy location += 'freebusy/' # put the appropriate collections into publishedFreeBusy to # avoid syncing the same event multiple times for share in getActiveShares(view): updatePublishedFreeBusy(share, location) hiddenResource = handle.getResource(location + 'hiddenEvents/') if handle.blockUntil(hiddenResource.exists): # someone has already published hiddenEvents for this # account. It's hard to say what should happen in this # case, for now just fail raise SharingError(_(u"Free/Busy information has already been published for this account")) # publish hiddenEvents share = _newOutboundShare(view, sharing_ns.hiddenEvents, shareName='hiddenEvents', account=account, useCalDAV=True) shares.append(share) sharing_ns.hiddenEvents.shares.append(share) share.conduit.inFreeBusy = True share.create() share.put(updateCallback=callback) else: # Create a CalDAV conduit / ICalendar format # Create a cloudxml subcollection # or just a freebusy resource share = _newOutboundShare(view, collection, classesToInclude=classesToInclude, shareName=shareName, displayName=displayName, account=account, useCalDAV=True, publishType=publishType) if attrsToExclude: share.filterAttributes = attrsToExclude try: collection.shares.append(share, alias) except ValueError: # There is already a 'main' share for this collection collection.shares.append(share) shares.append(share) if share.exists(): raise SharingError(_(u"Share already exists")) if inFreeBusy: share.conduit.inFreeBusy = True share.create() share.conduit.setDisplayName(displayName) if publishType == 'collection': # Create a subcollection to contain the cloudXML versions of # the shared items subShareName = u"%s/%s" % (shareName, SUBCOLLECTION) subShare = _newOutboundShare(view, collection, classesToInclude=classesToInclude, shareName=subShareName, displayName=displayName, account=account) subShare.conduit.inFreeBusy = inFreeBusy if attrsToExclude: subShare.filterAttributes = attrsToExclude else: subShare.filterAttributes = [] for attr in CALDAVFILTER: subShare.filterAttributes.append(attr) shares.append(subShare) if subShare.exists(): raise SharingError(_(u"Share already exists")) try: subShare.create() # sync the subShare before the CalDAV share share.follows = subShare # Since we're publishing twice as many resources: if progressMonitor: progressMonitor.totalWork *= 2 except SharingError: # We're not able to create the subcollection, so # must be a vanilla CalDAV Server. Continue on. subShare.delete(True) subShare = None else: subShare = None share.put(updateCallback=callback) # tickets after putting if supportsTickets and publishType == 'collection': share.conduit.createTickets() if inFreeBusy: if account == sharing_ns.prefs.freeBusyAccount: sharing_ns.publishedFreeBusy.addSource(collection) elif dav is not None: if publishType == 'freebusy': shareName += '.ifb' alias = 'freebusy' # We're speaking to a WebDAV server # Create a WebDAV conduit / cloudxml or freebusy format share = _newOutboundShare(view, collection, classesToInclude=classesToInclude, shareName=shareName, displayName=displayName, account=account, publishType=publishType) try: collection.shares.append(share, alias) except ValueError: # There is already a 'main' share for this collection collection.shares.append(share) shares.append(share) if share.exists(): raise SharingError(_(u"Share already exists")) share.create() share.put(updateCallback=callback) if supportsTickets: share.conduit.createTickets() if PUBLISH_MONOLITHIC_ICS: icsShareName = u"%s.ics" % shareName icsShare = _newOutboundShare(view, collection, classesToInclude=classesToInclude, shareName=icsShareName, displayName=displayName, account=account) shares.append(icsShare) # icsShare.follows = share icsShare.displayName = u"%s.ics" % displayName icsShare.format = ICalendarFormat(itsParent=icsShare) icsShare.mode = "put" if icsShare.exists(): raise SharingError(_(u"Share already exists")) icsShare.create() icsShare.put(updateCallback=callback) if supportsTickets: icsShare.conduit.createTickets() except (SharingError, zanshin.error.Error, M2Crypto.SSL.Checker.WrongHost, Utility.CertificateVerificationError, twisted.internet.error.TimeoutError), e: # Clean up share objects try: for share in shares: share.delete(True) except: pass raise return shares
d9474db5a0ac357a1917cdaae757e14b63c31bda /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/d9474db5a0ac357a1917cdaae757e14b63c31bda/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3808, 12, 5548, 16, 2236, 16, 3318, 774, 8752, 33, 7036, 16, 3808, 559, 273, 296, 5548, 2187, 3422, 774, 12689, 33, 7036, 16, 16218, 33, 7036, 16, 1089, 2428, 33, 7036, 4672, 3536, 9761, 279, 1849, 16, 6635, 23789, 1492, 356, 2544, 1282, 19, 11962, 358, 999, 16, 471, 3661, 4906, 225, 632, 723, 1849, 30, 293, 381, 18, 1350, 2532, 632, 891, 1849, 30, 1021, 1849, 358, 3808, 632, 723, 2236, 30, 2999, 17735, 3032, 632, 891, 2236, 30, 1021, 21001, 261, 4079, 17735, 13, 2236, 358, 999, 632, 723, 3318, 774, 8752, 30, 666, 434, 609, 632, 891, 3318, 774, 8752, 30, 1922, 3129, 666, 434, 20965, 667, 1257, 31, 309, 2112, 16, 1508, 1338, 1516, 3607, 5348, 3318, 903, 506, 5116, 632, 723, 3422, 774, 12689, 30, 666, 434, 609, 632, 891, 3422, 774, 12689, 30, 1922, 3129, 666, 434, 1566, 1257, 358, 2488, 1347, 23636, 632, 723, 16218, 30, 5252, 632, 891, 16218, 30, 1922, 3129, 508, 358, 999, 364, 23636, 31, 309, 486, 2112, 16, 326, 1849, 1807, 16218, 903, 506, 1399, 487, 279, 5023, 1634, 18, 225, 657, 3344, 648, 16, 358, 4543, 27953, 598, 2062, 6980, 16, 2400, 21, 2187, 2400, 22, 2187, 5527, 12990, 2026, 506, 12317, 18, 632, 723, 1089, 2428, 30, 707, 632, 891, 1089, 2428, 30, 1922, 3129, 1348, 707, 16, 1492, 903, 336, 2566, 26736, 4982, 326, 23636, 1207, 18, 225, 971, 326, 1348, 1135, 1053, 16, 326, 23636, 1674, 903, 2132, 3536, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3808, 12, 5548, 16, 2236, 16, 3318, 774, 8752, 33, 7036, 16, 3808, 559, 273, 296, 5548, 2187, 3422, 774, 12689, 33, 7036, 16, 16218, 33, 7036, 16, 1089, 2428, 33, 7036, 4672, 3536, 9761, 279, 1849, 16, 6635, 23789, 1492, 356, 2544, 1282, 19, 11962, 358, 999, 16, 471, 3661, 4906, 225, 632, 723, 1849, 30, 293, 381, 18, 1350, 2532, 632, 891, 1849, 30, 1021, 1849, 358, 3808, 632, 723, 2236, 30, 2999, 17735, 3032, 632, 891, 2236, 30, 1021, 21001, 261, 4079, 17735, 13, 2236, 358, 999, 632, 723, 3318, 774, 8752, 30, 666, 434, 609, 632, 891, 3318, 774, 8752, 30, 1922, 3129, 666, 434, 20965, 667, 1257, 31, 309, 2112, 16, 1508, 1338, 2 ]
for unit in queryset.iterator():
for unit in queryset[:64].iterator():
def get_current_units(request, step_queryset, units_queryset): """returns current active unit, and in case of POST previously active unit""" edit_unit = None prev_unit = None pager = None # GET gets priority if 'unit' in request.GET: # load a specific unit in GET try: edit_id = int(request.GET['unit']) edit_unit = step_queryset.get(id=edit_id) except (Unit.DoesNotExist, ValueError): pass elif 'page' in request.GET: # load first unit in a specific page profile = get_profile(request.user) unit_rows = profile.get_unit_rows() pager = paginate(request, units_queryset, items=unit_rows) edit_unit = pager.object_list[0] elif 'id' in request.POST and 'index' in request.POST: # GET doesn't specify a unit try POST prev_id = int(request.POST['id']) prev_index = int(request.POST['index']) pootle_path = request.POST['pootle_path'] back = request.POST.get('back', False) if back: queryset = (step_queryset.filter(store__pootle_path=pootle_path, index__lte=prev_index) | \ step_queryset.filter(store__pootle_path__lt=pootle_path) ).order_by('-store__pootle_path', '-index') else: queryset = (step_queryset.filter(store__pootle_path=pootle_path, index__gte=prev_index) | \ step_queryset.filter(store__pootle_path__gt=pootle_path) ).order_by('store__pootle_path', 'index') for unit in queryset.iterator(): if edit_unit is None and prev_unit is not None: edit_unit = unit break if unit.id == prev_id: prev_unit = unit elif unit.index > prev_index or back and unit.index < prev_index: logging.debug("submitting to a unit no longer part of step query, %s:%d", (pootle_path, prev_id)) # prev_unit no longer part of the query, load it directly edit_unit = unit prev_unit = Unit.objects.get(store__pootle_path=pootle_path, id=prev_id) break if edit_unit is None: if prev_unit is not None: # probably prev_unit was last unit in chain. if back: edit_unit = prev_unit else: # all methods failed, get first unit in queryset try: edit_unit = step_queryset[0:1][0] except IndexError: pass return prev_unit, edit_unit, pager
e4e5205275389aa7e6928b6077d275d21cc79c3d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11388/e4e5205275389aa7e6928b6077d275d21cc79c3d/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2972, 67, 7705, 12, 2293, 16, 2235, 67, 21729, 16, 4971, 67, 21729, 4672, 3536, 6154, 783, 2695, 2836, 16, 471, 316, 648, 434, 5485, 7243, 2695, 2836, 8395, 3874, 67, 4873, 273, 599, 2807, 67, 4873, 273, 599, 12679, 273, 599, 468, 4978, 5571, 4394, 309, 296, 4873, 11, 316, 590, 18, 3264, 30, 468, 1262, 279, 2923, 2836, 316, 4978, 775, 30, 3874, 67, 350, 273, 509, 12, 2293, 18, 3264, 3292, 4873, 19486, 3874, 67, 4873, 273, 2235, 67, 21729, 18, 588, 12, 350, 33, 4619, 67, 350, 13, 1335, 261, 2802, 18, 15264, 16, 2068, 4672, 1342, 1327, 296, 2433, 11, 316, 590, 18, 3264, 30, 468, 1262, 1122, 2836, 316, 279, 2923, 1363, 3042, 273, 336, 67, 5040, 12, 2293, 18, 1355, 13, 2836, 67, 3870, 273, 3042, 18, 588, 67, 4873, 67, 3870, 1435, 12679, 273, 15171, 12, 2293, 16, 4971, 67, 21729, 16, 1516, 33, 4873, 67, 3870, 13, 3874, 67, 4873, 273, 12679, 18, 1612, 67, 1098, 63, 20, 65, 1327, 296, 350, 11, 316, 590, 18, 3798, 471, 296, 1615, 11, 316, 590, 18, 3798, 30, 468, 4978, 3302, 1404, 4800, 279, 2836, 775, 5485, 2807, 67, 350, 273, 509, 12, 2293, 18, 3798, 3292, 350, 19486, 2807, 67, 1615, 273, 509, 12, 2293, 18, 3798, 3292, 1615, 19486, 293, 1632, 298, 67, 803, 273, 590, 18, 3798, 3292, 1631, 352, 298, 67, 803, 3546, 1473, 273, 590, 18, 3798, 18, 588, 2668, 823, 2187, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2972, 67, 7705, 12, 2293, 16, 2235, 67, 21729, 16, 4971, 67, 21729, 4672, 3536, 6154, 783, 2695, 2836, 16, 471, 316, 648, 434, 5485, 7243, 2695, 2836, 8395, 3874, 67, 4873, 273, 599, 2807, 67, 4873, 273, 599, 12679, 273, 599, 468, 4978, 5571, 4394, 309, 296, 4873, 11, 316, 590, 18, 3264, 30, 468, 1262, 279, 2923, 2836, 316, 4978, 775, 30, 3874, 67, 350, 273, 509, 12, 2293, 18, 3264, 3292, 4873, 19486, 3874, 67, 4873, 273, 2235, 67, 21729, 18, 588, 12, 350, 33, 4619, 67, 350, 13, 1335, 261, 2802, 18, 15264, 16, 2068, 4672, 1342, 1327, 296, 2433, 11, 316, 590, 18, 3264, 30, 468, 1262, 1122, 2836, 316, 279, 2 ]
self.ressource = (model, obj_id)
self.resource = (model, obj_id)
def __init__(self, model, obj_id, parent): self.glade = glade.XML(GLADE, 'win_attach', gettext.textdomain()) self.win = self.glade.get_widget('win_attach') self.win.set_icon(TRYTON_ICON) self.win.set_transient_for(parent) self.parent = parent self.ressource = (model, obj_id)
bac16d4eaf047074802febdef71309d975cf8061 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9151/bac16d4eaf047074802febdef71309d975cf8061/attachment.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 938, 16, 1081, 67, 350, 16, 982, 4672, 365, 18, 7043, 2486, 273, 5118, 2486, 18, 4201, 12, 43, 2534, 1639, 16, 296, 8082, 67, 7331, 2187, 24972, 18, 955, 4308, 10756, 365, 18, 8082, 273, 365, 18, 7043, 2486, 18, 588, 67, 6587, 2668, 8082, 67, 7331, 6134, 365, 18, 8082, 18, 542, 67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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 938, 16, 1081, 67, 350, 16, 982, 4672, 365, 18, 7043, 2486, 273, 5118, 2486, 18, 4201, 12, 43, 2534, 1639, 16, 296, 8082, 67, 7331, 2187, 24972, 18, 955, 4308, 10756, 365, 18, 8082, 273, 365, 18, 7043, 2486, 18, 588, 67, 6587, 2668, 8082, 67, 7331, 6134, 365, 18, 8082, 18, 542, 67, 3950, 12, 17805, 56, 673, 67, 21745, 13, 365, 18, 8082, 18, 542, 67, 22670, 67, 1884, 12, 2938, 13, 365, 18, 2938, 273, 982, 365, 18, 663, 552, 273, 261, 2284, 16, 1081, 67, 350, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
return self.CALL_FUNCTION(argc)+1
return self.CALL_FUNCTION(argc)-1
def CALL_FUNCTION_VAR(self, argc): return self.CALL_FUNCTION(argc)+1
7b358a65a3617245e4258bd0917666b170879137 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/7b358a65a3617245e4258bd0917666b170879137/pyassem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22753, 67, 7788, 67, 7716, 12, 2890, 16, 1501, 71, 4672, 327, 365, 18, 13730, 67, 7788, 12, 3175, 71, 27921, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22753, 67, 7788, 67, 7716, 12, 2890, 16, 1501, 71, 4672, 327, 365, 18, 13730, 67, 7788, 12, 3175, 71, 27921, 21, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
return schematron.validate(CIMFragment):
return schematron.validate(CIMFragment)
def validate(self): ''' Check to see if component is valid. Returns True/False ''' nm=NumericalModel(Centre.objects.get(id=self.centre_id),component_id) CIMDoc=nm.export(recurse=False) sct_doc = ET.parse("xsl/BasicChecks.sch") schematron = ET.Schematron(sct_doc) return schematron.validate(CIMFragment):
b62966d38b3ad99d9ecdef7d4a3e07f29aee7cbe /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7019/b62966d38b3ad99d9ecdef7d4a3e07f29aee7cbe/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 12, 2890, 4672, 9163, 2073, 358, 2621, 309, 1794, 353, 923, 18, 2860, 1053, 19, 8381, 9163, 8442, 33, 2578, 10882, 1488, 12, 15897, 266, 18, 6911, 18, 588, 12, 350, 33, 2890, 18, 2998, 266, 67, 350, 3631, 4652, 67, 350, 13, 17459, 1759, 33, 15094, 18, 6530, 12, 29362, 33, 8381, 13, 29023, 67, 2434, 273, 4518, 18, 2670, 2932, 30903, 19, 8252, 4081, 18, 28204, 7923, 30140, 270, 1949, 273, 4518, 18, 55, 1036, 270, 1949, 12, 87, 299, 67, 2434, 13, 327, 30140, 270, 1949, 18, 5662, 12, 39, 3445, 7456, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 12, 2890, 4672, 9163, 2073, 358, 2621, 309, 1794, 353, 923, 18, 2860, 1053, 19, 8381, 9163, 8442, 33, 2578, 10882, 1488, 12, 15897, 266, 18, 6911, 18, 588, 12, 350, 33, 2890, 18, 2998, 266, 67, 350, 3631, 4652, 67, 350, 13, 17459, 1759, 33, 15094, 18, 6530, 12, 29362, 33, 8381, 13, 29023, 67, 2434, 273, 4518, 18, 2670, 2932, 30903, 19, 8252, 4081, 18, 28204, 7923, 30140, 270, 1949, 273, 4518, 18, 55, 1036, 270, 1949, 12, 87, 299, 67, 2434, 13, 327, 30140, 270, 1949, 18, 5662, 12, 39, 3445, 7456, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
buildscript.execute(['make', '-f', 'client.mk', 'checkout'],
make = os.environ.get('MAKE', 'make') buildscript.execute([make, '-f', 'client.mk', 'checkout'],
def checkout(self, buildscript): buildscript.set_action('Checking out', self) cmd = ['cvs', '-z3', '-q', '-d', self.repository.cvsroot, 'checkout'] if self.revision: cmd.extend(['-r', self.revision]) else: cmd.append('-A') if buildscript.config.sticky_date: cmd.extend(['-D', buildscript.config.sticky_date]) cmd.append('mozilla/client.mk') buildscript.execute(cmd, cwd=buildscript.config.checkoutroot) buildscript.execute(['make', '-f', 'client.mk', 'checkout'], cwd=self.get_builddir(buildscript))
e2bee5a2591e6cd8e49fdcb23c96674dffd83524 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4596/e2bee5a2591e6cd8e49fdcb23c96674dffd83524/mozillamodule.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13926, 12, 2890, 16, 1361, 4263, 4672, 1361, 4263, 18, 542, 67, 1128, 2668, 14294, 596, 2187, 365, 13, 1797, 273, 10228, 71, 6904, 2187, 2400, 94, 23, 2187, 2400, 85, 2187, 2400, 72, 2187, 365, 18, 9071, 18, 71, 6904, 3085, 16, 296, 17300, 3546, 309, 365, 18, 13057, 30, 1797, 18, 14313, 12, 3292, 17, 86, 2187, 365, 18, 13057, 5717, 469, 30, 1797, 18, 6923, 2668, 17, 37, 6134, 309, 1361, 4263, 18, 1425, 18, 334, 13055, 67, 712, 30, 1797, 18, 14313, 12, 3292, 17, 40, 2187, 1361, 4263, 18, 1425, 18, 334, 13055, 67, 712, 5717, 1797, 18, 6923, 2668, 8683, 15990, 19, 2625, 18, 24816, 6134, 1361, 4263, 18, 8837, 12, 4172, 16, 7239, 33, 3510, 4263, 18, 1425, 18, 17300, 3085, 13, 225, 1221, 273, 1140, 18, 28684, 18, 588, 2668, 5535, 6859, 2187, 296, 6540, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13926, 12, 2890, 16, 1361, 4263, 4672, 1361, 4263, 18, 542, 67, 1128, 2668, 14294, 596, 2187, 365, 13, 1797, 273, 10228, 71, 6904, 2187, 2400, 94, 23, 2187, 2400, 85, 2187, 2400, 72, 2187, 365, 18, 9071, 18, 71, 6904, 3085, 16, 296, 17300, 3546, 309, 365, 18, 13057, 30, 1797, 18, 14313, 12, 3292, 17, 86, 2187, 365, 18, 13057, 5717, 469, 30, 1797, 18, 6923, 2668, 17, 37, 6134, 309, 1361, 4263, 18, 1425, 18, 334, 13055, 67, 712, 30, 1797, 18, 14313, 12, 3292, 17, 40, 2187, 1361, 4263, 18, 1425, 18, 334, 13055, 67, 712, 5717, 1797, 18, 6923, 2668, 8683, 15990, 19, 2625, 18, 24816, 6134, 1361, 4263, 18, 8837, 12, 4172, 2 ]
import networkx.generators.bipartite as nx_bip self.left, self.right = \ nx_bip.bipartite_sets(self.networkx_graph())
Graph.__init__(self, arg1, *args, **kwds) self.left, self.right = self.bipartite_sets() return
def __init__(self, *args, **kwds): r""" Bipartite graph.
49be70e5a95362ec30dd81b8dbc8ce6bf5fa414a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/49be70e5a95362ec30dd81b8dbc8ce6bf5fa414a/bipartite_graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 2826, 25577, 4672, 436, 8395, 605, 5762, 1137, 2667, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 2826, 25577, 4672, 436, 8395, 605, 5762, 1137, 2667, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
if exe == 'x' and out==None:
if exe == None and out==None:
def filedims(inp=None, out=None, large=None, parform=None, verb=False, exe=None): if exe == 'x' and out==None: # invalid combination, fix the call exe = 'g' return __run('sffiledims', __parse(locals()), inp, out, verb, __x(exe,glob_exe))
83e80f2a89de925c7813a3af90f96b32414dd343 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3143/83e80f2a89de925c7813a3af90f96b32414dd343/sf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 585, 8550, 12, 31647, 33, 7036, 16, 596, 33, 7036, 16, 7876, 33, 7036, 16, 779, 687, 33, 7036, 16, 6405, 33, 8381, 16, 15073, 33, 7036, 4672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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 585, 8550, 12, 31647, 33, 7036, 16, 596, 33, 7036, 16, 7876, 33, 7036, 16, 779, 687, 33, 7036, 16, 6405, 33, 8381, 16, 15073, 33, 7036, 4672, 225, 309, 15073, 422, 599, 471, 596, 631, 7036, 30, 468, 2057, 10702, 16, 2917, 326, 745, 15073, 273, 296, 75, 11, 327, 1001, 2681, 2668, 21668, 768, 8550, 2187, 1001, 2670, 12, 17977, 1435, 3631, 12789, 16, 596, 16, 6405, 16, 1001, 92, 12, 14880, 16, 10581, 67, 14880, 3719, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
.draft-content { background-color: .stable-draft { background-color: .implemented { background-color: .stable { background-color: body .editorial { color:gray; } :link { background-color:transparent; color: :visited { background-color:transparent; color: img { border-style:none; vertical-align:middle; } td :link { color:inherit; } td a { text-decoration:none; display:block; } td a:hover { text-decoration:underline; } /* filter */ .editorial tr.editorial, .editorial li.editorial, .hidden { display:none; }
.draft-content { background-color: .stable-draft { background-color: .implemented { background-color: .stable { background-color: body .editorial { color:gray } :link { background:transparent; color: :visited { background:transparent; color: img { border:0; vertical-align:middle } td :link { color:inherit } td a { text-decoration:none; display:block } td a:hover { text-decoration:underline } .editorial tr.editorial { display:none } pre { display:table; white-space:normal } samp samp { margin:0; display:block; white-space:pre } .deletion { background: .addition { background: .line-info { background:
def startFormatting(title, identifier, source): document = """Content-Type:text/html;charset=UTF-8
943afbec53903141cfdc88408bfe2ea256880388 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10248/943afbec53903141cfdc88408bfe2ea256880388/trackerlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 23974, 12, 2649, 16, 2756, 16, 1084, 4672, 1668, 273, 3536, 1350, 17, 559, 30, 955, 19, 2620, 31, 9999, 33, 5159, 17, 28, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
if os.access(item, os.R_OK) == False: return False for item2 in os.listdir(item):
if os.access(item, os.R_OK) == False: return False for item2 in os.listdir(item):
def expand_directory(self, item, stop_when_image_found, go_buttons_enabled): if self.stop_now == False and self.closing_app == False: folderlist = []
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4542, 67, 5149, 12, 2890, 16, 761, 16, 2132, 67, 13723, 67, 2730, 67, 7015, 16, 1960, 67, 16016, 67, 5745, 4672, 309, 365, 18, 5681, 67, 3338, 422, 1083, 471, 365, 18, 19506, 67, 2910, 422, 1083, 30, 3009, 1098, 273, 5378, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4542, 67, 5149, 12, 2890, 16, 761, 16, 2132, 67, 13723, 67, 2730, 67, 7015, 16, 1960, 67, 16016, 67, 5745, 4672, 309, 365, 18, 5681, 67, 3338, 422, 1083, 471, 365, 18, 19506, 67, 2910, 422, 1083, 30, 3009, 1098, 273, 5378, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
self.assertEquals(read_val, "sub_key", "Read subkey value wrong")
self.assertEquals(read_val, subkeystr, "Read subkey value wrong")
def ReadTestData(self, root_key): # Check we can get default value for this key. val = QueryValue(root_key, test_key_name) self.assertEquals(val, "Default value", "Registry didn't give back the correct value")
f82d9b52fae475a132a21d1b7174730f17b735de /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/f82d9b52fae475a132a21d1b7174730f17b735de/test_winreg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2720, 4709, 751, 12, 2890, 16, 1365, 67, 856, 4672, 468, 2073, 732, 848, 336, 805, 460, 364, 333, 498, 18, 1244, 273, 2770, 620, 12, 3085, 67, 856, 16, 1842, 67, 856, 67, 529, 13, 365, 18, 11231, 8867, 12, 1125, 16, 315, 1868, 460, 3113, 315, 4243, 10242, 1404, 8492, 1473, 326, 3434, 460, 7923, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2720, 4709, 751, 12, 2890, 16, 1365, 67, 856, 4672, 468, 2073, 732, 848, 336, 805, 460, 364, 333, 498, 18, 1244, 273, 2770, 620, 12, 3085, 67, 856, 16, 1842, 67, 856, 67, 529, 13, 365, 18, 11231, 8867, 12, 1125, 16, 315, 1868, 460, 3113, 315, 4243, 10242, 1404, 8492, 1473, 326, 3434, 460, 7923, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]