rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
inherited = _inclusiveNamespacePrefixes(node, self._inherit_context(node),
inherited,unused = _inclusiveNamespacePrefixes(node, self._inherit_context(node),
def __init__(self, node, write, **kw): '''Create and run the implementation.''' self.write = write self.subset = kw.get('subset') self.comments = kw.get('comments', 0) self.unsuppressedPrefixes = kw.get('unsuppressedPrefixes') nsdict = kw.get('nsdict', { 'xml': XMLNS.XML, 'xmlns': XMLNS.BASE }) # Processing state. sel...
c0147db0b9b6607aa24507cb068c88c1f611cec5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/c0147db0b9b6607aa24507cb068c88c1f611cec5/c14n.py
self._do_element(node, inherited)
self._do_element(node, inherited, unused=unused)
def __init__(self, node, write, **kw): '''Create and run the implementation.''' self.write = write self.subset = kw.get('subset') self.comments = kw.get('comments', 0) self.unsuppressedPrefixes = kw.get('unsuppressedPrefixes') nsdict = kw.get('nsdict', { 'xml': XMLNS.XML, 'xmlns': XMLNS.BASE }) # Processing state. sel...
c0147db0b9b6607aa24507cb068c88c1f611cec5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/c0147db0b9b6607aa24507cb068c88c1f611cec5/c14n.py
def _do_element(self, node, initial_other_attrs = []): '''_do_element(self, node, initial_other_attrs = []) -> None
def _do_element(self, node, initial_other_attrs = [], unused = None): '''_do_element(self, node, initial_other_attrs = [], unused = {}) -> None
def _do_element(self, node, initial_other_attrs = []): '''_do_element(self, node, initial_other_attrs = []) -> None Process an element (and its children).'''
c0147db0b9b6607aa24507cb068c88c1f611cec5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/c0147db0b9b6607aa24507cb068c88c1f611cec5/c14n.py
if _inclusive(self) or (in_subset and _in_subset(self.subset, a)):
if inclusive or (in_subset and _in_subset(self.subset, a)):
def _do_element(self, node, initial_other_attrs = []): '''_do_element(self, node, initial_other_attrs = []) -> None Process an element (and its children).'''
c0147db0b9b6607aa24507cb068c88c1f611cec5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/c0147db0b9b6607aa24507cb068c88c1f611cec5/c14n.py
if (n,v) not in ns_rendered.items() \ and (_inclusive(self) or \ _utilized(n, node, other_attrs, self.unsuppressedPrefixes)): ns_to_render.append((n, v))
if (n,v) not in ns_rendered.items(): if inclusive or _utilized(n, node, other_attrs, self.unsuppressedPrefixes): ns_to_render.append((n, v)) elif not inclusive: ns_unused_inherited[n] = v
def _do_element(self, node, initial_other_attrs = []): '''_do_element(self, node, initial_other_attrs = []) -> None Process an element (and its children).'''
c0147db0b9b6607aa24507cb068c88c1f611cec5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/c0147db0b9b6607aa24507cb068c88c1f611cec5/c14n.py
if not _inclusive(self) or _in_subset(self.subset,node.parentNode):
if not inclusive or _in_subset(self.subset,node.parentNode):
def _do_element(self, node, initial_other_attrs = []): '''_do_element(self, node, initial_other_attrs = []) -> None Process an element (and its children).'''
c0147db0b9b6607aa24507cb068c88c1f611cec5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/c0147db0b9b6607aa24507cb068c88c1f611cec5/c14n.py
state, self.state = self.state, (ns_local, ns_rendered, xml_attrs)
state, self.state = self.state, (ns_local, ns_rendered, xml_attrs, ns_unused_inherited)
def _do_element(self, node, initial_other_attrs = []): '''_do_element(self, node, initial_other_attrs = []) -> None Process an element (and its children).'''
c0147db0b9b6607aa24507cb068c88c1f611cec5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/c0147db0b9b6607aa24507cb068c88c1f611cec5/c14n.py
typecode = 'attribute_typecode_dict'
attribute_typecode = 'self.attribute_typecode_dict'
def FromMessageGetSimpleElementDeclaration(message): '''If message consists of one part with an element attribute, and this element is a simpleType return a string representing the python type, else return None. ''' assert isinstance(message, WSDLTools.Message), 'expecting WSDLTools.Message' if len(message.parts) == ...
95608c9d166b009a2f795386df86cd9904a4396a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/95608c9d166b009a2f795386df86cd9904a4396a/containers.py
atd = AttributeMixIn.typecode
atd = self.attribute_typecode
def _setAttributes(self, attributes): '''parameters attributes -- a flattened list of all attributes, from this list all items in attribute_typecode_dict will be generated into attrComponents. returns a list of strings representing the attribute_typecode_dict. ''' atd = AttributeMixIn.typecode atd_list = formatted_att...
95608c9d166b009a2f795386df86cd9904a4396a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/95608c9d166b009a2f795386df86cd9904a4396a/containers.py
'self.%s[("%s","anyAttribute")] = ZSI.TC.AnyElement()'\
'%s[("%s","anyAttribute")] = ZSI.TC.AnyElement()'\
def _setAttributes(self, attributes): '''parameters attributes -- a flattened list of all attributes, from this list all items in attribute_typecode_dict will be generated into attrComponents. returns a list of strings representing the attribute_typecode_dict. ''' atd = AttributeMixIn.typecode atd_list = formatted_att...
95608c9d166b009a2f795386df86cd9904a4396a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/95608c9d166b009a2f795386df86cd9904a4396a/containers.py
'self.%s[%s] = %s' % (atd, key, tc)
'%s[%s] = %s' % (atd, key, tc)
if tdef is not None: tc = '%s.%s(None)' %(NAD.getAlias(tdef.getTargetNamespace()), self.mangle(type_class_name(tdef.getAttributeName())) )
95608c9d166b009a2f795386df86cd9904a4396a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/95608c9d166b009a2f795386df86cd9904a4396a/containers.py
'self.%s[%s] = ZSI.TC.String()' %(atd, key)
'%s[%s] = ZSI.TC.String()' %(atd, key)
if tdef is not None: tc = '%s.%s(None)' %(NAD.getAlias(tdef.getTargetNamespace()), self.mangle(type_class_name(tdef.getAttributeName())) )
95608c9d166b009a2f795386df86cd9904a4396a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/95608c9d166b009a2f795386df86cd9904a4396a/containers.py
'self.%s[%s] = %s()' %(atd, key,
'%s[%s] = %s()' %(atd, key,
if tdef is not None: tc = '%s.%s(None)' %(NAD.getAlias(tdef.getTargetNamespace()), self.mangle(type_class_name(tdef.getAttributeName())) )
95608c9d166b009a2f795386df86cd9904a4396a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/95608c9d166b009a2f795386df86cd9904a4396a/containers.py
'self.%s[%s] = %s.%s(None)' \
'%s[%s] = %s.%s(None)' \
if tdef is not None: tc = '%s.%s(None)' %(NAD.getAlias(tdef.getTargetNamespace()), self.mangle(type_class_name(tdef.getAttributeName())) )
95608c9d166b009a2f795386df86cd9904a4396a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/95608c9d166b009a2f795386df86cd9904a4396a/containers.py
element.append('%sself.%s = {}'%(ID3, AttributeMixIn.typecode))
element.append('%s%s = {}'%(ID3, self.attribute_typecode))
def _setContent(self):
95608c9d166b009a2f795386df86cd9904a4396a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/95608c9d166b009a2f795386df86cd9904a4396a/containers.py
definition.append('%sself.%s = {}'%(ID3, AttributeMixIn.typecode))
def _setContent(self): '''JRB What is the difference between instance data ns, name, -- type definition? sKlass, sKlassNS? -- element declaration? ''' definition = [] if self._is_array is True: # # SOAP-ENC:Array if _is_xsd_or_soap_ns(self.sKlassNS) is False and self.sKlass == 'Array': raise ContainerError, 'unknown ty...
95608c9d166b009a2f795386df86cd9904a4396a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/95608c9d166b009a2f795386df86cd9904a4396a/containers.py
'%s%s.%s.__init__(self, pname, **kw)' \ %(ID3, NAD.getAlias(self.sKlassNS), type_class_name(self.sKlass) ),
'%sattributes = {}'%(ID3)
def _setContent(self): '''JRB What is the difference between instance data ns, name, -- type definition? sKlass, sKlassNS? -- element declaration? ''' definition = [] if self._is_array is True: # # SOAP-ENC:Array if _is_xsd_or_soap_ns(self.sKlassNS) is False and self.sKlass == 'Array': raise ContainerError, 'unknown ty...
95608c9d166b009a2f795386df86cd9904a4396a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/95608c9d166b009a2f795386df86cd9904a4396a/containers.py
'%sself.ofwhat = tuple(TClist)' %ID3, )
'%s%s.%s.__init__(self, pname, ofwhat=TClist, attributes=%s, restrict=True, **kw)' \ %(ID3, NAD.getAlias(self.sKlassNS), type_class_name(self.sKlass), self.attribute_typecode ), ) elif self.extension: definition.append(\ '%s%s.%s.__init__(self, pname, ofwhat=TClist, attributes=%s, extend=True, **kw)' \ %(ID3, NAD.getAl...
def _setContent(self): '''JRB What is the difference between instance data ns, name, -- type definition? sKlass, sKlassNS? -- element declaration? ''' definition = [] if self._is_array is True: # # SOAP-ENC:Array if _is_xsd_or_soap_ns(self.sKlassNS) is False and self.sKlass == 'Array': raise ContainerError, 'unknown ty...
95608c9d166b009a2f795386df86cd9904a4396a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/95608c9d166b009a2f795386df86cd9904a4396a/containers.py
definition.append(\ '%sself.ofwhat += tuple(TClist)' %ID3, ) for l in self.attrComponents: definition.append('%s%s'%(ID3, l))
raise Wsdl2PythonError,\ 'ComplexContent must be a restriction or extension'
def _setContent(self): '''JRB What is the difference between instance data ns, name, -- type definition? sKlass, sKlassNS? -- element declaration? ''' definition = [] if self._is_array is True: # # SOAP-ENC:Array if _is_xsd_or_soap_ns(self.sKlassNS) is False and self.sKlass == 'Array': raise ContainerError, 'unknown ty...
95608c9d166b009a2f795386df86cd9904a4396a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/95608c9d166b009a2f795386df86cd9904a4396a/containers.py
def pnameConstructor(self, superclass=None): if superclass: return '%s.__init__(self, pname, ofwhat=(), extend=False, restrict=False, **kw)' % superclass return 'def __init__(self, pname, ofwhat=(), extend=False, restrict=False, **kw):'
def _setContent(self): '''JRB What is the difference between instance data ns, name, -- type definition? sKlass, sKlassNS? -- element declaration? ''' definition = [] if self._is_array is True: # # SOAP-ENC:Array if _is_xsd_or_soap_ns(self.sKlassNS) is False and self.sKlass == 'Array': raise ContainerError, 'unknown ty...
95608c9d166b009a2f795386df86cd9904a4396a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/95608c9d166b009a2f795386df86cd9904a4396a/containers.py
definition.append('%sself.%s = {}'%(ID3, AttributeMixIn.typecode))
definition.append('%s%s = attributes or {}' %(ID3, self.attribute_typecode)) definition.append('%sif extend: TClist += ofwhat'%(ID3)) definition.append('%sif restrict: TClist = ofwhat' %(ID3)) if len(self.attrComponents) > 0: definition.append('%selse:' %(ID3)) for l in self.attrComponents: definition.append('%s%s'...
def _setContent(self): definition = [ '%sclass %s(ZSI.TCcompound.ComplexType, TypeDefinition):' % (ID1, self.getClassName()), '%s%s' % (ID2, self.schemaTag()), '%s%s' % (ID2, self.typeTag()), '%s%s' % (ID2, self.pnameConstructor()), #'%s' % self.getElements(), '%s%s' % (ID3, self.nsuriLogic()), '%sTClist = [%s]' % (I...
95608c9d166b009a2f795386df86cd9904a4396a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/95608c9d166b009a2f795386df86cd9904a4396a/containers.py
for l in self.attrComponents: definition.append('%s%s'%(ID3, l))
def _setContent(self): definition = [ '%sclass %s(ZSI.TCcompound.ComplexType, TypeDefinition):' % (ID1, self.getClassName()), '%s%s' % (ID2, self.schemaTag()), '%s%s' % (ID2, self.typeTag()), '%s%s' % (ID2, self.pnameConstructor()), #'%s' % self.getElements(), '%s%s' % (ID3, self.nsuriLogic()), '%sTClist = [%s]' % (I...
95608c9d166b009a2f795386df86cd9904a4396a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/95608c9d166b009a2f795386df86cd9904a4396a/containers.py
def pnameConstructor(self, superclass=None): ''' TODO: Logic is a little tricky. If superclass is ComplexType this is not used. ''' if superclass: return '%s.__init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw)' % superclass return 'def __init__(self, pname, ofwhat=(), attributes=None...
def _setContent(self): definition = [ '%sclass %s(ZSI.TCcompound.ComplexType, TypeDefinition):' % (ID1, self.getClassName()), '%s%s' % (ID2, self.schemaTag()), '%s%s' % (ID2, self.typeTag()), '%s%s' % (ID2, self.pnameConstructor()), #'%s' % self.getElements(), '%s%s' % (ID3, self.nsuriLogic()), '%sTClist = [%s]' % (I...
95608c9d166b009a2f795386df86cd9904a4396a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/95608c9d166b009a2f795386df86cd9904a4396a/containers.py
definition.append('%sself.%s = {}'%(ID3, AttributeMixIn.typecode))
definition.append('%s%s = {}'%(ID3, self.attribute_typecode))
def _setContent(self): if type(self.sKlass) in (types.ClassType, type): definition = [ '%sclass %s(%s, TypeDefinition):' \ % (ID1, self.getClassName(), self.sKlass), '%s%s' % (ID2, self.schemaTag()), '%s%s' % (ID2, self.typeTag()), '%s%s' % (ID2, self.pnameConstructor()), ] if self.getPythonType() is None: definition....
95608c9d166b009a2f795386df86cd9904a4396a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/95608c9d166b009a2f795386df86cd9904a4396a/containers.py
definition.append('%sself.%s = {}'%(ID3, AttributeMixIn.typecode))
definition.append('%s%s = {}'%(ID3, self.attribute_typecode))
def _setContent(self): if type(self.sKlass) in (types.ClassType, type): definition = [ '%sclass %s(%s, TypeDefinition):' \ % (ID1, self.getClassName(), self.sKlass), '%s%s' % (ID2, self.schemaTag()), '%s%s' % (ID2, self.typeTag()), '%s%s' % (ID2, self.pnameConstructor()), ] if self.getPythonType() is None: definition....
95608c9d166b009a2f795386df86cd9904a4396a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/95608c9d166b009a2f795386df86cd9904a4396a/containers.py
'%sself.%s = {}'%(ID3, AttributeMixIn.typecode),
'%s%s = {}'%(ID3, self.attribute_typecode),
def _setContent(self): if type(self.sKlass) in (types.ClassType, type): definition = [ '%sclass %s(%s, TypeDefinition):' \ % (ID1, self.getClassName(), self.sKlass), '%s%s' % (ID2, self.schemaTag()), '%s%s' % (ID2, self.typeTag()), '%s%s' % (ID2, self.pnameConstructor()), ] if self.getPythonType() is None: definition....
95608c9d166b009a2f795386df86cd9904a4396a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/95608c9d166b009a2f795386df86cd9904a4396a/containers.py
ordered_args[i] = v
def do_POST(self): status = 500 try: if self.server.config.dumpHeadersIn: s = 'Incoming HTTP headers' debugHeader(s) print self.raw_requestline.strip() print "\n".join(map (lambda x: x.strip(), self.headers.headers)) debugFooter(s)
c3850918cdd1629381a420aad0560609f5385a6c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/c3850918cdd1629381a420aad0560609f5385a6c/Server.py
if e[0] < 0: neg = '-' e[0] = abs(e[0])
def _marshalData(self): if self._cache == None: d = self._data e = list(d) neg = ''
09cac90aaba702999a36294002e277bea63d4430 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/09cac90aaba702999a36294002e277bea63d4430/SOAP.py
elif e[0] < 100: e[0] = '-' + "%02d" % e[0]
def _marshalData(self): if self._cache == None: d = self._data e = list(d) neg = ''
09cac90aaba702999a36294002e277bea63d4430 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/09cac90aaba702999a36294002e277bea63d4430/SOAP.py
e[0] = "%04d" % e[0]
if e[0] < 0: neg = '-' e[0] = abs(e[0]) if e[0] < 100: e[0] = '-' + "%02d" % e[0] else: e[0] = "%04d" % e[0]
def _marshalData(self): if self._cache == None: d = self._data e = list(d) neg = ''
09cac90aaba702999a36294002e277bea63d4430 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/09cac90aaba702999a36294002e277bea63d4430/SOAP.py
print 'subtype'
def extractSubtypes(self): subTypes = ''
3b3df59f7d50c7b136993412c8c76d03179b4411 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/3b3df59f7d50c7b136993412c8c76d03179b4411/wsdl2python.py
self.__ma = ma self.__config = config self.__action = 0
self.__ma = ma self.__config = config return def __call__(self, *args, **kw):
def __init__(self, call, name, ns = None, sa = None, hd = None, ma = None, config = Config):
451a2b5f64d25518d5448bce5c94f6af797c86dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/451a2b5f64d25518d5448bce5c94f6af797c86dd/SOAP.py
self.__action = 1
return self.__repr__()
def __init__(self, call, name, ns = None, sa = None, hd = None, ma = None, config = Config):
451a2b5f64d25518d5448bce5c94f6af797c86dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/451a2b5f64d25518d5448bce5c94f6af797c86dd/SOAP.py
self.__action = 2 else: self._action = 3 def __call__(self, *args, **kw): if self.__action == 1: return self.__repr__() elif self.__action == 2: return self.__f_call(*args, **kw)
return self.__f_call(*args, **kw)
def __init__(self, call, name, ns = None, sa = None, hd = None, ma = None, config = Config):
451a2b5f64d25518d5448bce5c94f6af797c86dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/451a2b5f64d25518d5448bce5c94f6af797c86dd/SOAP.py
pyobj.Actor = sub = GTD('urn:test', 'IfElseActor')(None).pyclass() klass = 'myclass' name = 'whatever' sub.Gui = 'foo' sub.Parameter = 'bar' sub.set_attribute_class(klass) sub.set_attribute_name(name)
ps = ParsedSoap(MSG) pyobj0 = ps.Parse(pyobj.typecode) sub0 = pyobj0.Actor self.failUnless(sub0.get_attribute_class() == klass, 'bad attribute class') self.failUnless(sub0.get_attribute_name() == name, 'bad attribute name') pyobj.Actor = sub1 = GTD('urn:test', 'IfElseActor')(None).pyclass() sub1.Gui = 'foo' sub1....
def test_local_type_substitution(self): self.types_module pyobj = GED('urn:test', 'test').pyclass() # derived type pyobj.Actor = sub = GTD('urn:test', 'IfElseActor')(None).pyclass() klass = 'myclass' name = 'whatever'
217e56e70a75a35c110e489a17e27fc4358a676f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/217e56e70a75a35c110e489a17e27fc4358a676f/test_DerivedTypes.py
print xml
def test_local_type_substitution(self): self.types_module pyobj = GED('urn:test', 'test').pyclass() # derived type pyobj.Actor = sub = GTD('urn:test', 'IfElseActor')(None).pyclass() klass = 'myclass' name = 'whatever'
217e56e70a75a35c110e489a17e27fc4358a676f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/217e56e70a75a35c110e489a17e27fc4358a676f/test_DerivedTypes.py
self.failUnless(sub.get_attribute_class() == klass, 'bad attribute class') self.failUnless(sub.get_attribute_name() == name, 'bad attribute name')
self.failUnless(sub2.get_attribute_class() == klass, 'bad attribute class') self.failUnless(sub2.get_attribute_name() == name, 'bad attribute name')
def test_local_type_substitution(self): self.types_module pyobj = GED('urn:test', 'test').pyclass() # derived type pyobj.Actor = sub = GTD('urn:test', 'IfElseActor')(None).pyclass() klass = 'myclass' name = 'whatever'
217e56e70a75a35c110e489a17e27fc4358a676f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/217e56e70a75a35c110e489a17e27fc4358a676f/test_DerivedTypes.py
self.failUnless(isinstance(sub2.typecode, sub.typecode.__class__),
self.failUnless(isinstance(sub2.typecode, sub1.typecode.__class__),
def test_local_type_substitution(self): self.types_module pyobj = GED('urn:test', 'test').pyclass() # derived type pyobj.Actor = sub = GTD('urn:test', 'IfElseActor')(None).pyclass() klass = 'myclass' name = 'whatever'
217e56e70a75a35c110e489a17e27fc4358a676f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/217e56e70a75a35c110e489a17e27fc4358a676f/test_DerivedTypes.py
(sub2.typecode, sub.typecode.__class__))
(sub2.typecode, sub1.typecode.__class__))
def test_local_type_substitution(self): self.types_module pyobj = GED('urn:test', 'test').pyclass() # derived type pyobj.Actor = sub = GTD('urn:test', 'IfElseActor')(None).pyclass() klass = 'myclass' name = 'whatever'
217e56e70a75a35c110e489a17e27fc4358a676f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/217e56e70a75a35c110e489a17e27fc4358a676f/test_DerivedTypes.py
t._dec.attributes['nillable'] = u"true"
if hasattr(t, '_ref'): t._ref.attributes['nillable'] = u"true" else: t._dec.attributes['nillable'] = u"true"
def getModelGroup(self): """returns a model group adapter """
bb7e4968159e4f197dbb1917f52c35cb4da0b8bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/bb7e4968159e4f197dbb1917f52c35cb4da0b8bb/wsdlInterface.py
self.cb(sw, pyobj)
self.cb(sw, pyobj, unsuppressedPrefixes)
def serialize(self, sw, pyobj, name=None, attrtext='',
1f81da82cc7a23bdfe08613ec1ba8db9bd4145eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/1f81da82cc7a23bdfe08613ec1ba8db9bd4145eb/TC.py
sw.AddCallback(self.cb, pyobj) def cb(self, sw, pyobj):
sw.AddCallback(self.cb, pyobj, unsuppressedPrefixes) def cb(self, sw, pyobj, unsuppressedPrefixes=[]):
def serialize(self, sw, pyobj, name=None, attrtext='',
1f81da82cc7a23bdfe08613ec1ba8db9bd4145eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/1f81da82cc7a23bdfe08613ec1ba8db9bd4145eb/TC.py
Canonicalize(pyobj, sw, comments=self.comments)
Canonicalize(pyobj, sw, unsuppressedPrefixes=unsuppressedPrefixes, comments=self.comments)
def cb(self, sw, pyobj): if sw.Known(pyobj): return objid = '%x' % id(pyobj) n = self.pname or ('E' + objid) print >>sw, '<%s SOAP-ENC:encodingStyle="" id="%s">' % (n, objid) Canonicalize(pyobj, sw, comments=self.comments) print >>sw, '</%s>' % n
1f81da82cc7a23bdfe08613ec1ba8db9bd4145eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/1f81da82cc7a23bdfe08613ec1ba8db9bd4145eb/TC.py
parser.parse(inpsrc)
try: parser.parse(inpsrc) except xml.sax.SAXParseException: parser._parser = None
def _parseSOAP(xml_str, rules = None): try: from cStringIO import StringIO except ImportError: from StringIO import StringIO parser = xml.sax.make_parser() t = SOAPParser(rules = rules) parser.setContentHandler(t) e = xml.sax.handler.ErrorHandler() parser.setErrorHandler(e) inpsrc = xml.sax.xmlreader.InputSource() in...
b56b5f0d504a4a63fdb4dfc46b0e5d56ce440d02 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/b56b5f0d504a4a63fdb4dfc46b0e5d56ce440d02/SOAP.py
def __init__(self, errno): self.errno = errno def __str__(self): if self.errno == ERR_GENERIC: return "Any ACPI error occured." elif self.errno == ERR_NO_DEVICE: return "ACPI is not configured on this host." elif self.errno == ERR_NOT_IMPLEMENTED: return "No implementation for this operating system." elif self.errno =...
self.update() def percent(self): return self.life_percent def time(self): return self.life_time def charging_state(self): return self.ac_line_state
def __init__(self, errno): self.errno = errno
81958559d95a169b9a5748ddefbe1148dd559089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4994/81958559d95a169b9a5748ddefbe1148dd559089/pmu.py
class PmuLinux(PmuBase): def update(self):
def __str__(self): if self.errno == ERR_GENERIC: return "Any ACPI error occured." elif self.errno == ERR_NO_DEVICE: return "ACPI is not configured on this host." elif self.errno == ERR_NOT_IMPLEMENTED: return "No implementation for this operating system." elif self.errno == ERR_NO_LOW_LEVEL: return "Acpi_lowlevel modul...
81958559d95a169b9a5748ddefbe1148dd559089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4994/81958559d95a169b9a5748ddefbe1148dd559089/pmu.py
class Acpi: """Interface class for ACPI"""
try: pmu_proc = open("/proc/pmu/info") except IOError: raise EnvironmentError data = {} lines = pmu_proc.readlines() for line in lines: token = line.split(':') data[token[0].strip()] = token[1].strip() try: pmu_battery = open("/proc/pmu/battery_0") except: self.ac_line_state = ONLINE return lines = pmu_battery.readl...
def __str__(self): if self.errno == ERR_GENERIC: return "Any ACPI error occured." elif self.errno == ERR_NO_DEVICE: return "ACPI is not configured on this host." elif self.errno == ERR_NOT_IMPLEMENTED: return "No implementation for this operating system." elif self.errno == ERR_NO_LOW_LEVEL: return "Acpi_lowlevel modul...
81958559d95a169b9a5748ddefbe1148dd559089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4994/81958559d95a169b9a5748ddefbe1148dd559089/pmu.py
def __init__(self): res = sys.platform if res.find("freebsd4") > -1: self.acpi = None raise NotImplemented elif res.find("netbsd1") > -1: self.acpi = None raise NotImplemented elif res.find("linux2") > -1: self.acpi = AcpiLinux() elif res.find("linux") > -1: self.acpi = AcpiLinux() else: self.acpi = None raise No...
self.life_time = int(int(data['time rem.']) / 60)
def __init__(self): res = sys.platform if res.find("freebsd4") > -1: self.acpi = None #throw exception raise NotImplemented
81958559d95a169b9a5748ddefbe1148dd559089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4994/81958559d95a169b9a5748ddefbe1148dd559089/pmu.py
def frequency(self, idx): """ Return the frequency of the processor""" return self.acpi.frequency(idx) def performance_states(self, idx): """ Return a list of available frequencies for the proc """ return self.acpi.performance_states(idx) def set_frequency(self, f): """ Set the processor frequency - Warning ! Needs...
pmu_proc.close() pmu_battery.close()
def fan_state(self, idx): """Returns fan states""" return self.acpi.fan_state(idx)
81958559d95a169b9a5748ddefbe1148dd559089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4994/81958559d95a169b9a5748ddefbe1148dd559089/pmu.py
def update(self): """Updates the ACPI state""" self.acpi.update()
d9046690729321e024ac4dab17519db74c4f42c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4994/d9046690729321e024ac4dab17519db74c4f42c9/acpi.py
if design_capacity == 0:
last_full_capacity = last_full_capacity + self.last_full_capacity[i] current_capacity = max(design_capacity, last_full_capacity) if current_capacity == 0:
def percent(self): """Returns percentage capacity of all batteries"""
d9046690729321e024ac4dab17519db74c4f42c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4994/d9046690729321e024ac4dab17519db74c4f42c9/acpi.py
return (life_capacity * 100) / design_capacity
return (life_capacity * 100) / current_capacity
def percent(self): """Returns percentage capacity of all batteries"""
d9046690729321e024ac4dab17519db74c4f42c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4994/d9046690729321e024ac4dab17519db74c4f42c9/acpi.py
time = totalCapacity / totalRate
if totalRate: time = totalCapacity / totalRate else: time = totalCapacity
def estimated_lifetime(self): # what should we return if state==charging? # it's not clean to return a time in one case and any # English string in another case. # The user can check for ac-state before call this func # fixed bug - if a battery is full and not discharging, it # would not be counted in the estimated li...
d9046690729321e024ac4dab17519db74c4f42c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4994/d9046690729321e024ac4dab17519db74c4f42c9/acpi.py
pb = self.images[(percent/10)]
index = min(percent/10+1, 10) pb = self.images[index]
def update_display(self, BATTERY): """Updates all the parts of our applet, and cleans it up if needed.""" BATTERY.update() percent = BATTERY.percent()
3fda6ccc1163cfe5d778375e7b3b0701ec7a4a93 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4994/3fda6ccc1163cfe5d778375e7b3b0701ec7a4a93/battery.py
unittest.main()
import sys sys.path.append('..') unittest.main()
def testDoImport(self): self.importer.doImport()
b0418d3a629884452cea0bebca654c83496cd820 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2238/b0418d3a629884452cea0bebca654c83496cd820/HAC4FileImporterTest.py
if env['PLATFORM'] == 'posix': module_builder = env.Program(target=filename, source=objects, LIBPATH=lib_path, LIBS=libs, RPATH=lib_path) else: module_builder = env.Program(target=filename, source=objects, LIBPATH=lib_path, LIBS=libs)
module_builder = env.Program(target=filename, source=objects, LIBPATH=lib_path, LIBS=libs)
def gen_mod_dep(self, variant): build_root = variant.build_root cpp_path = os.path.join(variant.build_root, 'include') env = variant.env env.Append(CPPPATH = [cpp_path]) header_dir = os.path.join(build_root, 'include', 'ns3') lib_path = os.path.join(build_root, 'lib') module_builders = [] for module in self.__modules: ...
c741eab329f8819eba3eb391d4c94bb81688bfbf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12851/c741eab329f8819eba3eb391d4c94bb81688bfbf/build.py
env = Environment()
inheritenv = (ARGUMENTS.get('inheritenv', 'n') in 'yY1') if inheritenv: env = Environment(ENV=os.environ) else: env = Environment()
def generate_dependencies(self): env = Environment() self.gen_mod_config(env) cc = env['CC'] cxx = env.subst(env['CXX']) common_flags = ARGUMENTS.get('cflags', '').split(' ') cxxflags = ARGUMENTS.get('cxxflags', '').split(' ') ldflags = ARGUMENTS.get('ldflags', '').split(' ') if cc == 'cl' and cxx == 'cl': env = Enviro...
8caf4108ebedfa9939737ce98e655097bd1a7240 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12851/8caf4108ebedfa9939737ce98e655097bd1a7240/build.py
create_dir_command = "rm -rf " + lcov_report_dir + " && mkdir " + lcov_report_dir + ";"
create_dir_command = "rm -rf " + lcov_report_dir create_dir_command += " && mkdir " + lcov_report_dir + ";"
def generate_dependencies (self): env = Environment() self.gen_mod_config (env) cc = env['CC'] cxx = env.subst (env['CXX']) common_flags = ARGUMENTS.get('cflags', '').split (' ') cxxflags = ARGUMENTS.get('cxxflags', '').split (' ') ldflags = ARGUMENTS.get('ldflags', '').split (' ') if cc == 'cl' and cxx == 'cl': env = ...
ce577f66f0b0018a2923f99a8fbb96fe2dbd5be0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12851/ce577f66f0b0018a2923f99a8fbb96fe2dbd5be0/build.py
lcov_command = "utils/lcov/lcov -c -d . -o " info_file
lcov_command = "utils/lcov/lcov -c -d . -o " + info_file lcov_command += " --source-dirs=" + os.getcwd () lcov_command += ":" + os.path.join (os.getcwd (), variant.build_root, 'include')
def generate_dependencies (self): env = Environment() self.gen_mod_config (env) cc = env['CC'] cxx = env.subst (env['CXX']) common_flags = ARGUMENTS.get('cflags', '').split (' ') cxxflags = ARGUMENTS.get('cxxflags', '').split (' ') ldflags = ARGUMENTS.get('ldflags', '').split (' ') if cc == 'cl' and cxx == 'cl': env = ...
ce577f66f0b0018a2923f99a8fbb96fe2dbd5be0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12851/ce577f66f0b0018a2923f99a8fbb96fe2dbd5be0/build.py
genhtml_command = "utils/lcov/genhtml -o " + lcov_report_data + " " + info_file
genhtml_command = "utils/lcov/genhtml -o " + lcov_report_dir genhtml_command += " " + info_file
def generate_dependencies (self): env = Environment() self.gen_mod_config (env) cc = env['CC'] cxx = env.subst (env['CXX']) common_flags = ARGUMENTS.get('cflags', '').split (' ') cxxflags = ARGUMENTS.get('cxxflags', '').split (' ') ldflags = ARGUMENTS.get('ldflags', '').split (' ') if cc == 'cl' and cxx == 'cl': env = ...
ce577f66f0b0018a2923f99a8fbb96fe2dbd5be0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12851/ce577f66f0b0018a2923f99a8fbb96fe2dbd5be0/build.py
def manage_addZSQLMethod(self, id, title,
def manage_addZSQLMethod(id, title,
def manage_addZSQLMethod(self, id, title, connection_id, arguments, template): """ Add an SQL Method to an ObjectManager. The 'connection_id' argument is the id of a database connection that resides in the current folder or in a folder above the current folder. The database should understand SQL. The 'arguments' ar...
16557482d1b465b1e53bb99d3e9eb8eaa4c3355e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9589/16557482d1b465b1e53bb99d3e9eb8eaa4c3355e/ZSQLMethod.py
They support three important abstractions:
SQL Methods behave like methods of the folders they are accessed in. In particular, they can be used from other methods, like Documents, ExternalMethods, and even other SQL Methods.
def manage_addZSQLMethod(self, id, title, connection_id, arguments, template): """ Add an SQL Method to an ObjectManager. The 'connection_id' argument is the id of a database connection that resides in the current folder or in a folder above the current folder. The database should understand SQL. The 'arguments' ar...
16557482d1b465b1e53bb99d3e9eb8eaa4c3355e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9589/16557482d1b465b1e53bb99d3e9eb8eaa4c3355e/ZSQLMethod.py
- Method
Database methods support the Searchable Object Interface. Search interface wizards can be used to build user interfaces to them. They can be used in joins and unions. They provide meta-data about their input parameters and result data.
def manage_addZSQLMethod(self, id, title, connection_id, arguments, template): """ Add an SQL Method to an ObjectManager. The 'connection_id' argument is the id of a database connection that resides in the current folder or in a folder above the current folder. The database should understand SQL. The 'arguments' ar...
16557482d1b465b1e53bb99d3e9eb8eaa4c3355e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9589/16557482d1b465b1e53bb99d3e9eb8eaa4c3355e/ZSQLMethod.py
SQL Methods behave like methods of the folders they are accessed in. In particular, they can be used from other methods, like Documents, ExternalMethods, and even other SQL Methods.
For more information, see the searchable-object interface specification.
def manage_addZSQLMethod(self, id, title, connection_id, arguments, template): """ Add an SQL Method to an ObjectManager. The 'connection_id' argument is the id of a database connection that resides in the current folder or in a folder above the current folder. The database should understand SQL. The 'arguments' ar...
16557482d1b465b1e53bb99d3e9eb8eaa4c3355e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9589/16557482d1b465b1e53bb99d3e9eb8eaa4c3355e/ZSQLMethod.py
- Searchability
Database methods support URL traversal to access and invoke methods on individual record objects. For example, suppose you had an 'employees' database method that took a single argument 'employee_id'. Suppose that employees had a 'service_record' method (defined in a record class or acquired from a folder). The 'servi...
def manage_addZSQLMethod(self, id, title, connection_id, arguments, template): """ Add an SQL Method to an ObjectManager. The 'connection_id' argument is the id of a database connection that resides in the current folder or in a folder above the current folder. The database should understand SQL. The 'arguments' ar...
16557482d1b465b1e53bb99d3e9eb8eaa4c3355e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9589/16557482d1b465b1e53bb99d3e9eb8eaa4c3355e/ZSQLMethod.py
Database methods support the Searchable Object Interface. Search interface wizards can be used to build user interfaces to them. They can be used in joins and unions. They provide meta-data about their input parameters and result data.
employees/employee_id/1234/service_record
def manage_addZSQLMethod(self, id, title, connection_id, arguments, template): """ Add an SQL Method to an ObjectManager. The 'connection_id' argument is the id of a database connection that resides in the current folder or in a folder above the current folder. The database should understand SQL. The 'arguments' ar...
16557482d1b465b1e53bb99d3e9eb8eaa4c3355e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9589/16557482d1b465b1e53bb99d3e9eb8eaa4c3355e/ZSQLMethod.py
For more information, see the searchable-object interface specification. - Containment Database methods support URL traversal to access and invoke methods on individual record objects. For example, suppose you had an 'employees' database method that took a single argument 'employee_id'. Suppose that employees had a ...
Search results are returned as Record objects. The schema of a Record objects matches the schema of the table queried in the search.
def manage_addZSQLMethod(self, id, title, connection_id, arguments, template): """ Add an SQL Method to an ObjectManager. The 'connection_id' argument is the id of a database connection that resides in the current folder or in a folder above the current folder. The database should understand SQL. The 'arguments' ar...
16557482d1b465b1e53bb99d3e9eb8eaa4c3355e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9589/16557482d1b465b1e53bb99d3e9eb8eaa4c3355e/ZSQLMethod.py
def __call__(self, REQUEST=None, **kw):
def __call__(REQUEST=None, **kw):
def __call__(self, REQUEST=None, **kw): """
16557482d1b465b1e53bb99d3e9eb8eaa4c3355e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9589/16557482d1b465b1e53bb99d3e9eb8eaa4c3355e/ZSQLMethod.py
def manage_edit(self,title,connection_id,arguments,template):
def manage_edit(title,connection_id,arguments,template):
def manage_edit(self,title,connection_id,arguments,template): """
16557482d1b465b1e53bb99d3e9eb8eaa4c3355e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9589/16557482d1b465b1e53bb99d3e9eb8eaa4c3355e/ZSQLMethod.py
specification, as would be given in the SQL method cration
specification, as would be given in the SQL method creation
def manage_edit(self,title,connection_id,arguments,template): """
16557482d1b465b1e53bb99d3e9eb8eaa4c3355e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9589/16557482d1b465b1e53bb99d3e9eb8eaa4c3355e/ZSQLMethod.py
if q.has_key('atbibliotopic_sort_on'):
if sequence_sort_on:
def queryCatalog(self, REQUEST=None, batch=False, b_size=None, full_objects=False, **kw): """Invoke the catalog using our criteria to augment any passed in query before calling the catalog. """ if REQUEST is None: REQUEST = getattr(self, 'REQUEST', {}) b_start = REQUEST.get('b_start', 0)
56b135b65a14f6320193a913793d664944f201eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9787/56b135b65a14f6320193a913793d664944f201eb/bibliotopic.py
if q.has_key('atbibliotopic_sort_on'): sequence_sort_on = q['atbibliotopic_sort_on'] del q['atbibliotopic_sort_on']
def queryCatalog(self, REQUEST=None, batch=False, b_size=None, full_objects=False, **kw): """Invoke the catalog using our criteria to augment any passed in query before calling the catalog. """ if REQUEST is None: REQUEST = getattr(self, 'REQUEST', {}) b_start = REQUEST.get('b_start', 0)
56b135b65a14f6320193a913793d664944f201eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9787/56b135b65a14f6320193a913793d664944f201eb/bibliotopic.py
def buildQuery(self, **kw): """Build Query """
97b2a528a822940531f1364fd1194938ee0e9a00 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9787/97b2a528a822940531f1364fd1194938ee0e9a00/bibliotopic.py
if navtool.getProperty('enable_wf_state_filtering', False):
if query and navtool.getProperty('enable_wf_state_filtering', False):
def buildQuery(self, **kw): """Build Query """
97b2a528a822940531f1364fd1194938ee0e9a00 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9787/97b2a528a822940531f1364fd1194938ee0e9a00/bibliotopic.py
security.declareProtected(permissions.View, 'filterWfStateIfNotOwner')
security.declareProtected(permissions.View, 'filterWfStateIfNotOwnerOfReference')
def criteriaByIndexId(self, indexId): # do not change the order of BIBLIOTOPIC_SORTFIELDS + BIBLIOTOPIC_CRITERIAFIELDS
ede980208b9d5ad4ed35b67cfa950c58f8ba9aaf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9787/ede980208b9d5ad4ed35b67cfa950c58f8ba9aaf/bibliotopic.py
print CATALOG_INDEXES
def addIndexesToCatalogTool(self, out): ctool = getToolByName(self, 'portal_catalog') if ctool: # add indexes and metadatas to the portal catalog ct = getToolByName(self, 'portal_catalog') print CATALOG_INDEXES for idx in CATALOG_INDEXES: if idx['name'] in ct.indexes(): ct.delIndex(idx['name']) ct.addIndex(**idx) ct.re...
08c82074e83a691ff222875556f02fd35e6f9cf1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9787/08c82074e83a691ff222875556f02fd35e6f9cf1/Install.py
if file.endswith(ext): return file[:-1*ext.__len__()] else: return file
end=file.__len__() try: end=file.rindex(ext) except ValueError: pass return file[begin:end]
def get_root_name(file): """Determine the root of the filename assuming that it either ends with '.xml' or is already a root""" ext=".xml" if file.endswith(ext): return file[:-1*ext.__len__()] else: return file
82526e82ee0e07c3a5659f3d7a248bfe759121b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7515/82526e82ee0e07c3a5659f3d7a248bfe759121b9/NXformat_dfn.py
outfile="%s.%s" % (root_name,ext)
outfile="%s%s.%s" % (path,root_name,ext)
def process_file(infile, outfile, options, DEBUG=1): # parse the xml file if DEBUG: print "Processing \"%s\"" % infile doc=parse(infile) if DEBUG: print " ... done" # determine the input name try: root_name=options.pop("--root") except KeyError: root_name=get_root_name(infile) # determine the proper formatte...
82526e82ee0e07c3a5659f3d7a248bfe759121b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7515/82526e82ee0e07c3a5659f3d7a248bfe759121b9/NXformat_dfn.py
template="/home/hgilde/nexus/nexus/contrib/bindings/nxpylib/test/monoxtas_template.xml")
template="monoxtas_template.xml")
def main(args): """ the entry point for testing purposes """ print "EXAMPLE 0: LOAD TEMPLATE META-DTD AND GENERATE SKELETON MONOXTAS NXFILE" print "========================================================================" f = NXfile(filename="monoxtas_template.nxs", mode=NXACC_CREATE5, template="/home/hgilde/nexus/...
8ff463a2995c8153254bde4fc4d25580ce03fbba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7515/8ff463a2995c8153254bde4fc4d25580ce03fbba/nxtest.py
class NodeLocation(testcase.TestCase): jsClass = u'Nevow.Athena.Tests.NodeLocation' def getWidgetDocument(self): """ Return some child elements for us to search in.
def getDynamicWidget(self): """ Return a widget dynamically for us to have more fun with.
def bar(self, req, tag): e = NodeLocationSubElement2() e.setFragmentParent(self) return e
a5cbbbdebfecdc9f9474921f401a9a296b9f8353 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7162/a5cbbbdebfecdc9f9474921f401a9a296b9f8353/livetest_athena.py
w(obj.replace('\\', '\\\\').replace('"', '\\"').encode('unicode-escape'))
w(unicodeEscape(obj))
def _serialize(obj, w, seen): if isinstance(obj, types.BooleanType): if obj: w('true') else: w('false') elif isinstance(obj, (int, long, float)): w(str(obj)) elif isinstance(obj, unicode): w('"') w(obj.replace('\\', '\\\\').replace('"', '\\"').encode('unicode-escape')) w('"') elif isinstance(obj, types.NoneType): w('nu...
acbc7d1eae3419dd2ebbc7b77745ff85bc923cdc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7162/acbc7d1eae3419dd2ebbc7b77745ff85bc923cdc/json.py
self.assertEquals(self.transport, [[(0, athena.CLOSE)], [(0, athena.CLOSE)]])
self.assertEquals(self.transport, [[(0, (athena.CLOSE, []))], [(0, (athena.CLOSE, []))]])
def testClosing(self): """ Test that closing a reliable message deliverer causes all of outs remaining outputs to be used up with a close message and that any future outputs added to it are immediately used in a similar manner. """ self.rdm.addOutput(mappend(self.transport)) self.rdm.addOutput(mappend(self.transport)) ...
912819f73efa7a1b6908927cb36773e358790cb6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7162/912819f73efa7a1b6908927cb36773e358790cb6/test_athena.py
self.assertEquals(self.transport, [[(0, athena.CLOSE)]])
self.assertEquals(self.transport, [[(0, (athena.CLOSE, []))]])
def testClosing(self): """ Test that closing a reliable message deliverer causes all of outs remaining outputs to be used up with a close message and that any future outputs added to it are immediately used in a similar manner. """ self.rdm.addOutput(mappend(self.transport)) self.rdm.addOutput(mappend(self.transport)) ...
912819f73efa7a1b6908927cb36773e358790cb6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7162/912819f73efa7a1b6908927cb36773e358790cb6/test_athena.py
self.livePage._disconnected()
self.livePage._disconnected(error.ConnectionDone("Connection closed"))
def action_close(self, ctx): """ The client is going away. Clean up after them. """ self.livePage._disconnected()
d052c7ff960bb81ad34915ce4f99e024ee8604fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7162/d052c7ff960bb81ad34915ce4f99e024ee8604fa/athena.py
return self
return configurable.TypedInterfaceConfigurable(self)
def configurable_formBuilder(self, ctx): return self
decb19a76ba1fbffa26a4268669b46e85417c0e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7162/decb19a76ba1fbffa26a4268669b46e85417c0e8/formbuilder.py
return urlToChild(ctx, *segments[1:], **{'__session_just_started__':1}), ()
return urlToChild(ctx, *segments[1:]), ()
def locateChild(self, ctx, segments): request = inevow.IRequest(ctx) # ctx.remember(self, ILoginManager) path = segments[0] if self.useCookies: cookie = request.getCookie(self.cookieKey) else: cookie = '' request.setupSession = lambda : self.createSession(ctx, segments)
cb301f9ed423f321eea0910bae37dd9faa3cbfa9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7162/cb301f9ed423f321eea0910bae37dd9faa3cbfa9/guard.py
docFactory = loaders.stan(T.input(type="text", id="typehere", render=T.directive('liveFragment')))
docFactory = loaders.stan( T.span(render=T.directive('liveFragment'))[ '\n', T.input(type="text", _class="typehere"), '\n', T.h3(_class="description"), ])
def render_typehereField(self, ctx, data): frag = TypeAheadFieldFragment() frag.page = self return frag
46718af56b9b019716ccf591d3659b14ba382ba7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7162/46718af56b9b019716ccf591d3659b14ba382ba7/typeahead.py
def render_liveglue(self, ctx):
def render_liveglue(self, ctx, data):
def render_liveglue(self, ctx): if True: mk = tags.script(type='text/javascript', src=url.here.child("mochikit.js")) else: mk = [ tags.script(type='text/javascript', src=url.here.child('MochiKit').child(fName)) for fName in ['Base.js', 'Async.js']]
c7df8d74cdc2dd2fd5b1241a98d6f084d5b23661 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7162/c7df8d74cdc2dd2fd5b1241a98d6f084d5b23661/athena.py
tags.script(type='text/javascript')[tags.raw(""" var nevow_livepageId = '%s'; """ % self.clientID)],
def render_liveglue(self, ctx): if True: mk = tags.script(type='text/javascript', src=url.here.child("mochikit.js")) else: mk = [ tags.script(type='text/javascript', src=url.here.child('MochiKit').child(fName)) for fName in ['Base.js', 'Async.js']]
7d94266ba21e690aa2b7c45357322364a7dcef5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7162/7d94266ba21e690aa2b7c45357322364a7dcef5c/athena.py
d = {u'Divmod': util.resource_filename('nevow', 'athena.js'), u'Nevow.Athena': util.resource_filename('nevow', 'widget.js'), u'MochiKit': util.resource_filename('nevow', 'MochiKit.js')}
d = {}
def allJavascriptPackages(): """ Return a dictionary mapping JavaScript module names to local filenames which implement those modules. This mapping is constructed from all the C{IJavascriptPackage} plugins available on the system. It also includes C{Nevow.Athena} as a special case. """ d = {u'Divmod': util.resource_f...
9c738c70c54773e4d9b43a628978a49ce9414db3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7162/9c738c70c54773e4d9b43a628978a49ce9414db3/athena.py
self.mapping = {}
self.mapping = { u'Divmod': util.resource_filename('nevow', 'athena.js'), u'Nevow.Athena': util.resource_filename('nevow', 'widget.js'), u'MochiKit': util.resource_filename('nevow', 'MochiKit.js')}
def __init__(self, mapping=None): if mapping is None: self.mapping = {} self._loadPlugins = True else: self.mapping = mapping
9c738c70c54773e4d9b43a628978a49ce9414db3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7162/9c738c70c54773e4d9b43a628978a49ce9414db3/athena.py
class GetAttribute(testcase.TestCase): jsClass = u'Divmod.Runtime.Tests.GetAttribute'
def getWidgetDocument(self): """ Return part of a document which contains nodes nested several layers deep. The client side of this test will use their class names to determine that ordering of results from the DOM traversal function is correct. """ return tags.div(_class='container')[ tags.div(_class='left_child')[ t...
a4582605b7d463b1dd300ec3921906d8b2fc55b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7162/a4582605b7d463b1dd300ec3921906d8b2fc55b8/livetest_runtime.py
<div class="tabbedPane" xmlns:nevow="http://nevow.com/ns/nevow/0.1" nevow:render="liveFragment">
<div class="tabbedPane" xmlns:nevow="http://nevow.com/ns/nevow/0.1" nevow:render="liveFragment" style="opacity: .3">
def _(): for n, (tab, page) in enumerate(pages): tID = '%s_tab_%i'%(name, n) pID = '%s_page_%i'%(name, n) yield (t.li(id_=tID)[tab], t.div(id_=pID)[page], flt(js[tID,pID], quote = False))
651c05f9bf381121879cc3b7557f501ba2b7b203 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7162/651c05f9bf381121879cc3b7557f501ba2b7b203/tabbedPane.py
"[v0.5] ", """Using a Page with a 'content' pattern is
"""[v0.5] Using a Page with a 'content' pattern is
def rend(self, context, data): # Create a new context so the current context is not polluted with # remembrances. context = WovenContext(parent=context)
3a1f08cc69ee2d6a423f56cb8e8e140328334425 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7162/3a1f08cc69ee2d6a423f56cb8e8e140328334425/rend.py
self._disconnectNotifications = []
def _becomeLive(self): """ Assign this LivePage a clientID, associate it with a factory, and begin tracking its state. This only occurs when a LivePage is *rendered*, not when it is instantiated. """ self.clientID = self.factory.addClient(self)
107ab4f839d17869bf0d1a050186ab3a06f91d22 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7162/107ab4f839d17869bf0d1a050186ab3a06f91d22/athena.py
d = {u'Nevow.Athena': util.resource_filename('nevow', 'widget.js')}
d = {u'Divmod': util.resource_filename('nevow', 'athena.js'), u'Nevow.Athena': util.resource_filename('nevow', 'widget.js'), u'MochiKit': util.resource_filename('nevow', 'MochiKit.js')}
def allJavascriptPackages(): """ Return a dictionary mapping JavaScript module names to local filenames which implement those modules. This mapping is constructed from all the C{IJavascriptPackage} plugins available on the system. It also includes C{Nevow.Athena} as a special case. """ d = {u'Nevow.Athena': util.reso...
74ad68dfe451e25250f27cee0d99b9ad989bbf25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7162/74ad68dfe451e25250f27cee0d99b9ad989bbf25/athena.py
if True: mk = tags.script(type='text/javascript', src=url.here.child("mochikit.js")) else: mk = [ tags.script(type='text/javascript', src=url.here.child('MochiKit').child(fName)) for fName in ['Base.js', 'Async.js']]
def render_liveglue(self, ctx, data): if True: mk = tags.script(type='text/javascript', src=url.here.child("mochikit.js")) else: mk = [ tags.script(type='text/javascript', src=url.here.child('MochiKit').child(fName)) for fName in ['Base.js', 'Async.js']]
74ad68dfe451e25250f27cee0d99b9ad989bbf25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7162/74ad68dfe451e25250f27cee0d99b9ad989bbf25/athena.py
mk, tags.script(type='text/javascript', src=url.here.child('MochiKitLogConsole.js')), tags.script(type='text/javascript', src=url.here.child("athena.js")),
tags.script(type='text/javascript', src=self.getJSModuleURL('MochiKit')), tags.script(type='text/javascript', src=self.getJSModuleURL('Divmod')),
def render_liveglue(self, ctx, data): if True: mk = tags.script(type='text/javascript', src=url.here.child("mochikit.js")) else: mk = [ tags.script(type='text/javascript', src=url.here.child('MochiKit').child(fName)) for fName in ['Base.js', 'Async.js']]
74ad68dfe451e25250f27cee0d99b9ad989bbf25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7162/74ad68dfe451e25250f27cee0d99b9ad989bbf25/athena.py
_javascript = {'mochikit.js': 'MochiKit.js', 'athena.js': 'athena.js', 'MochiKitLogConsole.js': 'MochiKitLogConsole.js'} def childFactory(self, ctx, name): if name in self._javascript: return static.File(util.resource_filename('nevow', self._javascript[name])) def child_MochiKit(self, ctx): return static.File(util.re...
def render_liveglue(self, ctx, data): if True: mk = tags.script(type='text/javascript', src=url.here.child("mochikit.js")) else: mk = [ tags.script(type='text/javascript', src=url.here.child('MochiKit').child(fName)) for fName in ['Base.js', 'Async.js']]
74ad68dfe451e25250f27cee0d99b9ad989bbf25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7162/74ad68dfe451e25250f27cee0d99b9ad989bbf25/athena.py
return self.page.jsModuleRoot.child(moduleName)
return self.page.getJSModuleURL(moduleName)
def getJSModuleURL(self, moduleName): return self.page.jsModuleRoot.child(moduleName)
74ad68dfe451e25250f27cee0d99b9ad989bbf25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7162/74ad68dfe451e25250f27cee0d99b9ad989bbf25/athena.py