rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
def end_array(self):
def end_array(self, data):
def end_array(self): mark = self._marks[-1] del self._marks[-1] # map arrays to Python lists self._stack[mark:] = [self._stack[mark:]] self._value = 0
80ead46c3b0b9513bc116e8fe08faa2f91145a91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/80ead46c3b0b9513bc116e8fe08faa2f91145a91/xmlrpclib.py
def end_struct(self):
def end_struct(self, data):
def end_struct(self): mark = self._marks[-1] del self._marks[-1] # map structs to Python dictionaries dict = {} items = self._stack[mark:] for i in range(0, len(items), 2): dict[items[i]] = items[i+1] self._stack[mark:] = [dict] self._value = 0
80ead46c3b0b9513bc116e8fe08faa2f91145a91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/80ead46c3b0b9513bc116e8fe08faa2f91145a91/xmlrpclib.py
dict[items[i]] = items[i+1]
dict[_stringify(items[i])] = items[i+1]
def end_struct(self): mark = self._marks[-1] del self._marks[-1] # map structs to Python dictionaries dict = {} items = self._stack[mark:] for i in range(0, len(items), 2): dict[items[i]] = items[i+1] self._stack[mark:] = [dict] self._value = 0
80ead46c3b0b9513bc116e8fe08faa2f91145a91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/80ead46c3b0b9513bc116e8fe08faa2f91145a91/xmlrpclib.py
def end_base64(self, join=string.join):
def end_base64(self, data):
def end_base64(self, join=string.join): value = Binary() value.decode(join(self._data, "")) self.append(value) self._value = 0
80ead46c3b0b9513bc116e8fe08faa2f91145a91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/80ead46c3b0b9513bc116e8fe08faa2f91145a91/xmlrpclib.py
value.decode(join(self._data, ""))
value.decode(data)
def end_base64(self, join=string.join): value = Binary() value.decode(join(self._data, "")) self.append(value) self._value = 0
80ead46c3b0b9513bc116e8fe08faa2f91145a91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/80ead46c3b0b9513bc116e8fe08faa2f91145a91/xmlrpclib.py
def end_dateTime(self, join=string.join):
def end_dateTime(self, data):
def end_dateTime(self, join=string.join): value = DateTime() value.decode(join(self._data, "")) self.append(value)
80ead46c3b0b9513bc116e8fe08faa2f91145a91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/80ead46c3b0b9513bc116e8fe08faa2f91145a91/xmlrpclib.py
value.decode(join(self._data, ""))
value.decode(data)
def end_dateTime(self, join=string.join): value = DateTime() value.decode(join(self._data, "")) self.append(value)
80ead46c3b0b9513bc116e8fe08faa2f91145a91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/80ead46c3b0b9513bc116e8fe08faa2f91145a91/xmlrpclib.py
def end_value(self):
def end_value(self, data):
def end_value(self): # if we stumble upon an value element with no internal # elements, treat it as a string element if self._value: self.end_string()
80ead46c3b0b9513bc116e8fe08faa2f91145a91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/80ead46c3b0b9513bc116e8fe08faa2f91145a91/xmlrpclib.py
self.end_string()
self.end_string(data)
def end_value(self): # if we stumble upon an value element with no internal # elements, treat it as a string element if self._value: self.end_string()
80ead46c3b0b9513bc116e8fe08faa2f91145a91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/80ead46c3b0b9513bc116e8fe08faa2f91145a91/xmlrpclib.py
def end_params(self):
def end_params(self, data):
def end_params(self): self._type = "params"
80ead46c3b0b9513bc116e8fe08faa2f91145a91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/80ead46c3b0b9513bc116e8fe08faa2f91145a91/xmlrpclib.py
def end_fault(self):
def end_fault(self, data):
def end_fault(self): self._type = "fault"
80ead46c3b0b9513bc116e8fe08faa2f91145a91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/80ead46c3b0b9513bc116e8fe08faa2f91145a91/xmlrpclib.py
def end_methodName(self, join=string.join): self._methodname = join(self._data, "")
def end_methodName(self, data): if self._encoding: data = _decode(data, self._encoding) self._methodname = data self._type = "methodName"
def end_methodName(self, join=string.join): self._methodname = join(self._data, "")
80ead46c3b0b9513bc116e8fe08faa2f91145a91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/80ead46c3b0b9513bc116e8fe08faa2f91145a91/xmlrpclib.py
target = Unmarshaller() if FastParser: return FastParser(target), target return SlowParser(target), target def dumps(params, methodname=None, methodresponse=None): assert type(params) == TupleType or isinstance(params, Fault),\
"""getparser() -> parser, unmarshaller Create an instance of the fastest available parser, and attach it to an unmarshalling object. Return both objects. """ if FastParser and FastUnmarshaller: target = FastUnmarshaller(True, False, binary, datetime) parser = FastParser(target) else: target = Unmarshaller() if FastPa...
def getparser(): # get the fastest available parser, and attach it to an # unmarshalling object. return both objects. target = Unmarshaller() if FastParser: return FastParser(target), target return SlowParser(target), target
80ead46c3b0b9513bc116e8fe08faa2f91145a91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/80ead46c3b0b9513bc116e8fe08faa2f91145a91/xmlrpclib.py
m = Marshaller()
if isinstance(params, Fault): methodresponse = 1 elif methodresponse and isinstance(params, TupleType): assert len(params) == 1, "response tuple must be a singleton" if not encoding: encoding = "utf-8" m = Marshaller(encoding)
def dumps(params, methodname=None, methodresponse=None): # convert a tuple or a fault object to an XML-RPC packet assert type(params) == TupleType or isinstance(params, Fault),\ "argument must be tuple or Fault instance" m = Marshaller() data = m.dumps(params) # standard XML-RPC wrappings if methodname: # a method c...
80ead46c3b0b9513bc116e8fe08faa2f91145a91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/80ead46c3b0b9513bc116e8fe08faa2f91145a91/xmlrpclib.py
"<?xml version='1.0'?>\n"
xmlheader,
def dumps(params, methodname=None, methodresponse=None): # convert a tuple or a fault object to an XML-RPC packet assert type(params) == TupleType or isinstance(params, Fault),\ "argument must be tuple or Fault instance" m = Marshaller() data = m.dumps(params) # standard XML-RPC wrappings if methodname: # a method c...
80ead46c3b0b9513bc116e8fe08faa2f91145a91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/80ead46c3b0b9513bc116e8fe08faa2f91145a91/xmlrpclib.py
"<methodName>%s</methodName>\n" "%s\n" "</methodCall>\n" % (methodname, data)
"<methodName>", methodname, "</methodName>\n", data, "</methodCall>\n"
def dumps(params, methodname=None, methodresponse=None): # convert a tuple or a fault object to an XML-RPC packet assert type(params) == TupleType or isinstance(params, Fault),\ "argument must be tuple or Fault instance" m = Marshaller() data = m.dumps(params) # standard XML-RPC wrappings if methodname: # a method c...
80ead46c3b0b9513bc116e8fe08faa2f91145a91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/80ead46c3b0b9513bc116e8fe08faa2f91145a91/xmlrpclib.py
elif methodresponse or isinstance(params, Fault):
elif methodresponse:
def dumps(params, methodname=None, methodresponse=None): # convert a tuple or a fault object to an XML-RPC packet assert type(params) == TupleType or isinstance(params, Fault),\ "argument must be tuple or Fault instance" m = Marshaller() data = m.dumps(params) # standard XML-RPC wrappings if methodname: # a method c...
80ead46c3b0b9513bc116e8fe08faa2f91145a91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/80ead46c3b0b9513bc116e8fe08faa2f91145a91/xmlrpclib.py
"<?xml version='1.0'?>\n" "<methodResponse>\n" "%s\n" "</methodResponse>\n" % data
xmlheader, "<methodResponse>\n", data, "</methodResponse>\n"
def dumps(params, methodname=None, methodresponse=None): # convert a tuple or a fault object to an XML-RPC packet assert type(params) == TupleType or isinstance(params, Fault),\ "argument must be tuple or Fault instance" m = Marshaller() data = m.dumps(params) # standard XML-RPC wrappings if methodname: # a method c...
80ead46c3b0b9513bc116e8fe08faa2f91145a91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/80ead46c3b0b9513bc116e8fe08faa2f91145a91/xmlrpclib.py
return data
else: return data return string.join(data, "")
def dumps(params, methodname=None, methodresponse=None): # convert a tuple or a fault object to an XML-RPC packet assert type(params) == TupleType or isinstance(params, Fault),\ "argument must be tuple or Fault instance" m = Marshaller() data = m.dumps(params) # standard XML-RPC wrappings if methodname: # a method c...
80ead46c3b0b9513bc116e8fe08faa2f91145a91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/80ead46c3b0b9513bc116e8fe08faa2f91145a91/xmlrpclib.py
"""data -> unmarshalled data, method name Convert an XML-RPC packet to unmarshalled data plus a method name (None if not present). If the XML-RPC packet represents a fault condition, this function raises a Fault exception. """
def loads(data): # convert an XML-RPC packet to data plus a method name (None # if not present). if the XML-RPC packet represents a fault # condition, this function raises a Fault exception. p, u = getparser() p.feed(data) p.close() return u.close(), u.getmethodname()
80ead46c3b0b9513bc116e8fe08faa2f91145a91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/80ead46c3b0b9513bc116e8fe08faa2f91145a91/xmlrpclib.py
"""Handles an HTTP transaction to an XML-RPC server"""
"""Handles an HTTP transaction to an XML-RPC server."""
def __call__(self, *args): return self.__send(self.__name, args)
80ead46c3b0b9513bc116e8fe08faa2f91145a91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/80ead46c3b0b9513bc116e8fe08faa2f91145a91/xmlrpclib.py
def request(self, host, handler, request_body):
verbose = 0 def request(self, host, handler, request_body, verbose=0):
def __call__(self, *args): return self.__send(self.__name, args)
80ead46c3b0b9513bc116e8fe08faa2f91145a91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/80ead46c3b0b9513bc116e8fe08faa2f91145a91/xmlrpclib.py
import httplib h = httplib.HTTP(host) h.putrequest("POST", handler) h.putheader("Host", host) h.putheader("User-Agent", self.user_agent) h.putheader("Content-Type", "text/xml") h.putheader("Content-Length", str(len(request_body))) h.endheaders() if request_body: h.send(request_body)
h = self.make_connection(host) if verbose: h.set_debuglevel(1) self.send_request(h, handler, request_body) self.send_host(h, host) self.send_user_agent(h) self.send_content(h, request_body)
def request(self, host, handler, request_body): # issue XML-RPC request
80ead46c3b0b9513bc116e8fe08faa2f91145a91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/80ead46c3b0b9513bc116e8fe08faa2f91145a91/xmlrpclib.py
return self.parse_response(h.getfile()) def parse_response(self, f):
self.verbose = verbose return self.parse_response(h.getfile(), h._conn.sock) def getparser(self): return getparser() def make_connection(self, host): import httplib return httplib.HTTP(host) def send_request(self, connection, handler, request_body): connection.putrequest("POST", handler) def send_host(self, conn...
def request(self, host, handler, request_body): # issue XML-RPC request
80ead46c3b0b9513bc116e8fe08faa2f91145a91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/80ead46c3b0b9513bc116e8fe08faa2f91145a91/xmlrpclib.py
p, u = getparser()
p, u = self.getparser()
def parse_response(self, f): # read response from input file, and parse it
80ead46c3b0b9513bc116e8fe08faa2f91145a91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/80ead46c3b0b9513bc116e8fe08faa2f91145a91/xmlrpclib.py
response = f.read(1024)
if sock: response = sock.recv(1024) else: response = f.read(1024)
def parse_response(self, f): # read response from input file, and parse it
80ead46c3b0b9513bc116e8fe08faa2f91145a91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/80ead46c3b0b9513bc116e8fe08faa2f91145a91/xmlrpclib.py
class Server: """Represents a connection to an XML-RPC server""" def __init__(self, uri, transport=None):
class SafeTransport(Transport): """Handles an HTTPS transaction to an XML-RPC server.""" def make_connection(self, host): import httplib if isinstance(host, TupleType): host, x509 = host else: x509 = {} try: HTTPS = httplib.HTTPS except AttributeError: raise NotImplementedError,\ "your version of httplib doesn't sup...
def parse_response(self, f): # read response from input file, and parse it
80ead46c3b0b9513bc116e8fe08faa2f91145a91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/80ead46c3b0b9513bc116e8fe08faa2f91145a91/xmlrpclib.py
if type != "http":
if type not in ("http", "https"):
def __init__(self, uri, transport=None): # establish a "logical" server connection
80ead46c3b0b9513bc116e8fe08faa2f91145a91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/80ead46c3b0b9513bc116e8fe08faa2f91145a91/xmlrpclib.py
transport = Transport()
if type == "https": transport = SafeTransport() else: transport = Transport()
def __init__(self, uri, transport=None): # establish a "logical" server connection
80ead46c3b0b9513bc116e8fe08faa2f91145a91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/80ead46c3b0b9513bc116e8fe08faa2f91145a91/xmlrpclib.py
request = dumps(params, methodname)
request = dumps(params, methodname, encoding=self.__encoding)
def __request(self, methodname, params): # call a method on the remote server
80ead46c3b0b9513bc116e8fe08faa2f91145a91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/80ead46c3b0b9513bc116e8fe08faa2f91145a91/xmlrpclib.py
request )
request)
def __request(self, methodname, params): # call a method on the remote server
80ead46c3b0b9513bc116e8fe08faa2f91145a91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/80ead46c3b0b9513bc116e8fe08faa2f91145a91/xmlrpclib.py
return response[0]
response = response[0]
def __request(self, methodname, params): # call a method on the remote server
80ead46c3b0b9513bc116e8fe08faa2f91145a91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/80ead46c3b0b9513bc116e8fe08faa2f91145a91/xmlrpclib.py
"<Server proxy for %s%s>" %
"<ServerProxy for %s%s>" %
def __repr__(self): return ( "<Server proxy for %s%s>" % (self.__host, self.__handler) )
80ead46c3b0b9513bc116e8fe08faa2f91145a91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/80ead46c3b0b9513bc116e8fe08faa2f91145a91/xmlrpclib.py
server = Server("http://betty.userland.com")
server = ServerProxy("http://betty.userland.com")
def __getattr__(self, name): # magic method dispatcher return _Method(self.__request, name)
80ead46c3b0b9513bc116e8fe08faa2f91145a91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/80ead46c3b0b9513bc116e8fe08faa2f91145a91/xmlrpclib.py
namedGrpVals = {} for name, val in mo.groupdict().items(): namedGrpVals[val] = name grps = [] for idx, grp in zip(range(1, len(mo.groups())+1), mo.groups()): name = namedGrpVals.get(grp, '')
namedGroups = [] for name, idx in ro.groupindex.items(): namedGroups += [(idx, name, mo.group(name))] namedGroups.sort() for idx, name, group in namedGroups:
def OnUpdate(self, event): string = self.txtString.GetValue() regex = self.txtRegex.GetValue()
434526f92ce673ff2f495cf5628ae0d034a7478d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/434526f92ce673ff2f495cf5628ae0d034a7478d/RegexEditor.plug-in.py
self.lcGroups.SetStringItem(idx-1, 2, str(grp))
self.lcGroups.SetStringItem(idx-1, 2, group)
def OnUpdate(self, event): string = self.txtString.GetValue() regex = self.txtRegex.GetValue()
434526f92ce673ff2f495cf5628ae0d034a7478d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/434526f92ce673ff2f495cf5628ae0d034a7478d/RegexEditor.plug-in.py
except: pass
except Exception, message: print str(message)
def parseMixedBody(parseClasses, lines): """ Return a dictionary with keys representing classes that 'understood' the line and values a list of found instances of the found class """ cat = {} for parseClass in parseClasses: cat[parseClass] = [] for line in lines: ln = string.strip(line) if (ln == 'pass') or (ln == '')...
ccb6582d7eb425ea777b66bd120553ee645c7389 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ccb6582d7eb425ea777b66bd120553ee645c7389/methodparse.py
def parseMixedBody(parseClasses, lines): """ Return a dictionary with keys representing classes that 'understood' the line and values a list of found instances of the found class """ cat = {} for parseClass in parseClasses: cat[parseClass] = [] for line in lines: ln = string.strip(line) if (ln == 'pass') or (ln == '')...
ccb6582d7eb425ea777b66bd120553ee645c7389 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ccb6582d7eb425ea777b66bd120553ee645c7389/methodparse.py
def renameCompName2(self, old_value, new_value): # XXX This is ugly but has to do until a better # XXX strategy is conceived. # Rename references to ctrl in string of property param oldCtrlSrcRef = Utils.srcRefFromCtrlName(old_value) newCtrlSrcRef = Utils.srcRefFromCtrlName(new_value) for idx in range(len(self.params...
ccb6582d7eb425ea777b66bd120553ee645c7389 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ccb6582d7eb425ea777b66bd120553ee645c7389/methodparse.py
param = self.params[idx] if Utils.startswith(param, 'self.'+coll_init): nameEnd = string.rfind(param, '_') name = param[16:nameEnd] if name == old_value: self.params[idx] = 'self.'+coll_init+new_value+param[nameEnd:]
def renameCompName2(self, old_value, new_value): # XXX This is ugly but has to do until a better # XXX strategy is conceived. # Rename references to ctrl in string of property param oldCtrlSrcRef = Utils.srcRefFromCtrlName(old_value) newCtrlSrcRef = Utils.srcRefFromCtrlName(new_value) for idx in range(len(self.params...
ccb6582d7eb425ea777b66bd120553ee645c7389 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ccb6582d7eb425ea777b66bd120553ee645c7389/methodparse.py
coll_init = '_init_coll_'
def asText(self): return '%s.%s(%s)' %(Utils.srcRefFromCtrlName(self.comp_name), self.prop_setter, string.join(self.params, ', '))
ccb6582d7eb425ea777b66bd120553ee645c7389 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ccb6582d7eb425ea777b66bd120553ee645c7389/methodparse.py
def asText(self):
ccb6582d7eb425ea777b66bd120553ee645c7389 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ccb6582d7eb425ea777b66bd120553ee645c7389/methodparse.py
else: self.params = params
else: self.params = params
def __init__(self, line = None, comp_name = '', method = '', params = None): self.comp_name = comp_name self.ctrl_name = '&None&' self.method = method if params is None: self.params = {} else: self.params = params if line: self.m = is_coll_item_init.search(line) if self.m: self.comp_name = self.m.group('id...
ccb6582d7eb425ea777b66bd120553ee645c7389 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ccb6582d7eb425ea777b66bd120553ee645c7389/methodparse.py
print 'CollectionItemInitParse.rename', old_value, new_value
def renameCompName2(self, old_value, new_value):
ccb6582d7eb425ea777b66bd120553ee645c7389 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ccb6582d7eb425ea777b66bd120553ee645c7389/methodparse.py
print 'renamed ref'
def renameCompName2(self, old_value, new_value):
ccb6582d7eb425ea777b66bd120553ee645c7389 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ccb6582d7eb425ea777b66bd120553ee645c7389/methodparse.py
def asText(self):
ccb6582d7eb425ea777b66bd120553ee645c7389 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ccb6582d7eb425ea777b66bd120553ee645c7389/methodparse.py
if hasattr(s, '_sub_sizer'):
if s in sizerParents or \ hasattr(s, '_sub_sizer') or hasattr(s, '_has_control'):
def getObjects(self): sizers = self.companion.designer.getObjectsOfClass(wxSizerPtr) for n, s in sizers.items(): if hasattr(s, '_sub_sizer'): del sizers[n] sizerNames = sizers.keys() sizerNames.sort()
f1282503f876232c6a9f48c3d5b7a52bbc481a8d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/f1282503f876232c6a9f48c3d5b7a52bbc481a8d/SizerCompanions.py
'Height': IntConstrPropEdit
'Height': IntConstrPropEdit,
def __init__(self, name, designer, parentCompanion, ctrl): CollectionDTC.__init__(self, name, designer, parentCompanion, ctrl) self.editors = {'Window': SizerWinEnumConstrPropEdit, 'Sizer': SizerEnumConstrPropEdit, 'Proportion': IntConstrPropEdit, 'Flag': SizerFlagsConstrPropEdit, 'Border': IntConstrPropEdit, 'Width': ...
f1282503f876232c6a9f48c3d5b7a52bbc481a8d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/f1282503f876232c6a9f48c3d5b7a52bbc481a8d/SizerCompanions.py
return {0: 'None', 1: '0', 'flag': '0', 'border': '0'}
return {0: 'None', 1: '0', 'flag': '0', 'border': '0'}
def designTimeSource(self, wId, method=None): if method is None: method = self.insertionMethod if method == 'AddWindow': return {0: 'None', 1: '0', 'flag': '0', 'border': '0'} elif method == 'AddSizer': return {0: 'None', 1: '0', 'flag': '0', 'border': '0'} elif method == 'AddSpacer': return {0: '8', 1: '8', 'fla...
f1282503f876232c6a9f48c3d5b7a52bbc481a8d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/f1282503f876232c6a9f48c3d5b7a52bbc481a8d/SizerCompanions.py
return {0: 'None', 1: '0', 'flag': '0', 'border': '0'}
return {0: 'None', 1: '0', 'flag': '0', 'border': '0'}
def designTimeSource(self, wId, method=None): if method is None: method = self.insertionMethod if method == 'AddWindow': return {0: 'None', 1: '0', 'flag': '0', 'border': '0'} elif method == 'AddSizer': return {0: 'None', 1: '0', 'flag': '0', 'border': '0'} elif method == 'AddSpacer': return {0: '8', 1: '8', 'fla...
f1282503f876232c6a9f48c3d5b7a52bbc481a8d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/f1282503f876232c6a9f48c3d5b7a52bbc481a8d/SizerCompanions.py
return {0: '8', 1: '8', 'flag': '0', 'border': '0'}
return {0: '8', 1: '8', 'flag': '0', 'border': '0'}
def designTimeSource(self, wId, method=None): if method is None: method = self.insertionMethod if method == 'AddWindow': return {0: 'None', 1: '0', 'flag': '0', 'border': '0'} elif method == 'AddSizer': return {0: 'None', 1: '0', 'flag': '0', 'border': '0'} elif method == 'AddSpacer': return {0: '8', 1: '8', 'fla...
f1282503f876232c6a9f48c3d5b7a52bbc481a8d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/f1282503f876232c6a9f48c3d5b7a52bbc481a8d/SizerCompanions.py
def defaultAction(self): constr = self.textConstrLst[self.index] if constr.method == 'AddWindow': if constr.params[0] != 'None': name = Utils.ctrlNameFromSrcRef(constr.params[0]) designer = self.designer.controllerView compn, ctrl = designer.objects[name][:2] designer.inspector.selectObject(compn, true) designer.Raise(...
## def defaultAction(self):
f1282503f876232c6a9f48c3d5b7a52bbc481a8d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/f1282503f876232c6a9f48c3d5b7a52bbc481a8d/SizerCompanions.py
wxCallAfter(self.designer.collEditors[colEdKey].refreshCtrl, 1)
collEditView = self.designer.collEditors[colEdKey] wxCallAfter(self.setWindowRefresh, collEditView) def setWindowRefresh(self, collEditView): collEditView.refreshCtrl(1) collEditView.selectObject(self.index) if collEditView.frame: collEditView.frame.selectObject(self.index)
def SetWindow(self, value): self.setParamAndUpdate(0, value) colEdKey = (self.parentCompanion.name, 'Items') if self.designer.collEditors.has_key(colEdKey): wxCallAfter(self.designer.collEditors[colEdKey].refreshCtrl, 1)
f1282503f876232c6a9f48c3d5b7a52bbc481a8d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/f1282503f876232c6a9f48c3d5b7a52bbc481a8d/SizerCompanions.py
def getSizerRefreshProps(self): return ('Width', 'Height', 'Flag', 'Border', 'Proportion')
def getSizerRefreshProps(self): return ('Width', 'Height', 'Flag', 'Border', 'Proportion')
f1282503f876232c6a9f48c3d5b7a52bbc481a8d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/f1282503f876232c6a9f48c3d5b7a52bbc481a8d/SizerCompanions.py
if name in self.getSizerRefreshProps():
if name in ('Width', 'Height'):
def persistProp(self, name, setterName, value): CollectionDTC.persistProp(self, name, setterName, value) if name in self.getSizerRefreshProps(): self.recreateSizers()
f1282503f876232c6a9f48c3d5b7a52bbc481a8d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/f1282503f876232c6a9f48c3d5b7a52bbc481a8d/SizerCompanions.py
'The generated source will be invalid outside the Designer' ' and should be fixed before executing.')
'The generated source will be invalid outside the ' 'Designer and should be fixed before executing.')
def writeCollectionItems(self, output, stripFrmId=''): CollectionDTC.writeCollectionItems(self, output, stripFrmId) warn = 0 for constr in self.textConstrLst: if constr.params[0] == 'None': wxLogWarning('No control/sizer for sizer item of %s'%( self.parentCompanion.name)) warn = 1 if warn: wxLogWarning('None values are...
f1282503f876232c6a9f48c3d5b7a52bbc481a8d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/f1282503f876232c6a9f48c3d5b7a52bbc481a8d/SizerCompanions.py
return {'rows': '0', 'cols': '0', 'vgap': '0', 'hgap': '0'}
return {'rows': '1', 'cols': '0', 'vgap': '0', 'hgap': '0'}
def designTimeSource(self): return {'rows': '0', 'cols': '0', 'vgap': '0', 'hgap': '0'}
f1282503f876232c6a9f48c3d5b7a52bbc481a8d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/f1282503f876232c6a9f48c3d5b7a52bbc481a8d/SizerCompanions.py
if not numRows and not numCols: wxLogError('Rows and Cols may not both be 0') return if not numRows or not numCols: numItems = len(self.companion.designer.showCollectionEditor( self.companion.name, 'Items', false).companion.textConstrLst) else: numItems = -1
def edit(self, event): ce = self.companion.designer.showCollectionEditor(self.companion.name, self.name, false) growableRows, growableCols = ce.companion.getGrowables() fgsCompn = ce.companion.parentCompanion numRows = self.companion.eval(fgsCompn.textConstr.params['rows']) numCols = self.companion.eval(fgsCompn.text...
f1282503f876232c6a9f48c3d5b7a52bbc481a8d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/f1282503f876232c6a9f48c3d5b7a52bbc481a8d/SizerCompanions.py
self.editors['StaticBox'] = ReadOnlyConstrPropEdit
def __init__(self, name, designer, objClass): ControlLinkedSizerDTC.__init__(self, name, designer, objClass) self.editors['Orientation'] = EnumPropEdit self.names['Orientation'] = {'wxVERTICAL': wxVERTICAL, 'wxHORIZONTAL': wxHORIZONTAL} self.options['Orientation'] = [wxVERTICAL, wxHORIZONTAL] #self.editors['BoxSizer'] ...
f1282503f876232c6a9f48c3d5b7a52bbc481a8d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/f1282503f876232c6a9f48c3d5b7a52bbc481a8d/SizerCompanions.py
self.editors['Notebook'] = ReadOnlyConstrPropEdit
def __init__(self, name, designer, objClass): ControlLinkedSizerDTC.__init__(self, name, designer, objClass) #self.editors['Notebook'] = WinEnumConstrPropEdit
f1282503f876232c6a9f48c3d5b7a52bbc481a8d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/f1282503f876232c6a9f48c3d5b7a52bbc481a8d/SizerCompanions.py
key = event.KeyCode()
key = event.GetKeyCode()
def OnKeyPressed(self, event): key = event.KeyCode() if key == 13: self.OnOpen(event) else: event.Skip()
d7d566042ba1a8304a241f721b8119d223d12011 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/d7d566042ba1a8304a241f721b8119d223d12011/Explorer.py
self.SetKeywords(0, 'and assert break class continue def del elif else except ' 'exec finally for from global if import in is lambda None ' 'not or pass print raise return try while true false') self.SetViewWhitespace(false)
if old_stc: self.SetKeywords(0, 'and assert break class continue def del elif else except ' 'exec finally for from global if import in is lambda None ' 'not or pass print raise return try while true false') self.SetViewWhitespace(false) else: self.SetKeyWords(0, 'and assert break class continue def del elif else excep...
def __init__(self, wId, margin): self.SetEdgeMode(wxSTC_EDGE_LINE) self.SetEdgeColumn(80)
89eb19653f42afd80f73c01b18538a7b5352c0fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/89eb19653f42afd80f73c01b18538a7b5352c0fc/StyledTextCtrls.py
'and assert break class continue def del elif else except '
89eb19653f42afd80f73c01b18538a7b5352c0fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/89eb19653f42afd80f73c01b18538a7b5352c0fc/StyledTextCtrls.py
'and assert break class continue def del elif else except '
89eb19653f42afd80f73c01b18538a7b5352c0fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/89eb19653f42afd80f73c01b18538a7b5352c0fc/StyledTextCtrls.py
charBefore = self.GetCharAt(caretPos - 1) styleBefore = self.GetStyleAt(caretPos - 1)
if old_stc: charBefore = self.GetCharAt(caretPos - 1) styleBefore = ord(self.GetStyleAt(caretPos - 1)) else: charBefore = chr(self.GetCharAt(caretPos - 1)) styleBefore = self.GetStyleAt(caretPos - 1)
def OnUpdateUI(self, evt):
89eb19653f42afd80f73c01b18538a7b5352c0fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/89eb19653f42afd80f73c01b18538a7b5352c0fc/StyledTextCtrls.py
if charBefore and charBefore in "[]{}()" and ord(styleBefore) == 10:
if charBefore and charBefore in "[]{}()" and styleBefore == 10:
def OnUpdateUI(self, evt):
89eb19653f42afd80f73c01b18538a7b5352c0fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/89eb19653f42afd80f73c01b18538a7b5352c0fc/StyledTextCtrls.py
charAfter = self.GetCharAt(caretPos) styleAfter = self.GetStyleAt(caretPos) if charAfter and charAfter in "[]{}()" and ord(styleAfter) == 10:
if old_stc: charAfter = self.GetCharAt(caretPos) styleAfter = ord(self.GetStyleAt(caretPos)) else: charAfter = chr(self.GetCharAt(caretPos)) styleAfter = self.GetStyleAt(caretPos) if charAfter and charAfter in "[]{}()" and styleAfter == 10:
def OnUpdateUI(self, evt):
89eb19653f42afd80f73c01b18538a7b5352c0fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/89eb19653f42afd80f73c01b18538a7b5352c0fc/StyledTextCtrls.py
self.styleStart = self.styleLength = 0
self.styleStart = 0 self.styleLength = 0
def __init__(self): self.handCrs = wxStockCursor(wxCURSOR_HAND) self.stndCrs = wxStockCursor(wxCURSOR_ARROW) self.IndicatorSetStyle(0, wxSTC_INDIC_PLAIN) self.IndicatorSetColour(0, wxBLUE) self.styleStart = self.styleLength = 0 self.ctrlDown = false EVT_MOTION(self, self.OnBrowseMotion) EVT_LEFT_DOWN(self, self.OnBrows...
89eb19653f42afd80f73c01b18538a7b5352c0fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/89eb19653f42afd80f73c01b18538a7b5352c0fc/StyledTextCtrls.py
'''Called when a link is clicked. Override to use, return true if click is swallowed '''
"""Called when a link is clicked. Override to use, return true if click is swallowed """
def BrowseClick(self, word, line, lineNo, start, style): '''Called when a link is clicked. Override to use, return true if click is swallowed ''' return false
89eb19653f42afd80f73c01b18538a7b5352c0fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/89eb19653f42afd80f73c01b18538a7b5352c0fc/StyledTextCtrls.py
self.Refresh(false)
def underlineWord(self, start, length):
89eb19653f42afd80f73c01b18538a7b5352c0fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/89eb19653f42afd80f73c01b18538a7b5352c0fc/StyledTextCtrls.py
stl = ord(self.GetStyleAt(pos)) & 31
if old_stc: stl = ord(self.GetStyleAt(pos)) & 31 else: stl = self.GetStyleAt(pos) & 31
def OnBrowseMotion(self, event): try: #check if words should be underlined if event.ControlDown(): mp = event.GetPosition() pos = self.PositionFromPoint(wxPoint(mp.x, mp.y)) stl = ord(self.GetStyleAt(pos)) & 31 if self.StyleVeto(stl): if self.styleLength > 0: self.styleStart, self.styleLength = \ self.clearUnderline(s...
89eb19653f42afd80f73c01b18538a7b5352c0fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/89eb19653f42afd80f73c01b18538a7b5352c0fc/StyledTextCtrls.py
def OnBrowseClick(self, event): if self.styleLength > 0: lnNo = self.GetLineFromPos(self.styleStart)
def getStyledWordElems(self, styleStart, styleLength): if styleLength > 0: lnNo = self.GetLineFromPos(styleStart)
def OnBrowseMotion(self, event): try: #check if words should be underlined if event.ControlDown(): mp = event.GetPosition() pos = self.PositionFromPoint(wxPoint(mp.x, mp.y)) stl = ord(self.GetStyleAt(pos)) & 31 if self.StyleVeto(stl): if self.styleLength > 0: self.styleStart, self.styleLength = \ self.clearUnderline(s...
89eb19653f42afd80f73c01b18538a7b5352c0fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/89eb19653f42afd80f73c01b18538a7b5352c0fc/StyledTextCtrls.py
start = self.styleStart-lnStPs word = line[start:start+self.styleLength] style = ord(self.GetStyleAt(self.styleStart)) & 31 if self.BrowseClick(word, line, lnNo, start, style): return
start = styleStart - lnStPs word = line[start:start+styleLength] return word, line, lnNo, start else: return '', 0, 0, 0 def OnBrowseClick(self, event): word, line, lnNo, start = self.getStyledWordElems(self.styleStart, self.styleLength) if word: if old_stc: style = ord(self.GetStyleAt(self.styleStart)) & 31 else: sty...
def OnBrowseClick(self, event): if self.styleLength > 0: lnNo = self.GetLineFromPos(self.styleStart) lnStPs = self.GetLineStartPos(lnNo) line = self.GetLine(lnNo) start = self.styleStart-lnStPs word = line[start:start+self.styleLength] style = ord(self.GetStyleAt(self.styleStart)) & 31 if self.BrowseClick(word, line, l...
89eb19653f42afd80f73c01b18538a7b5352c0fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/89eb19653f42afd80f73c01b18538a7b5352c0fc/StyledTextCtrls.py
self.SetKeywords(0, hypertext_elements + hypertext_attributes + \ ' public !doctype '+zope_elements)
if old_stc: self.SetKeywords(0, hypertext_elements + hypertext_attributes + \ ' public !doctype '+zope_elements) else: self.SetKeyWords(0, hypertext_elements + hypertext_attributes + \ ' public !doctype '+zope_elements)
def __init__(self, wId): self.SetEOLMode(wxSTC_EOL_LF) self.eol = wxSTC_EOL_LF #endOfLines[self.GetEOLMode()]
89eb19653f42afd80f73c01b18538a7b5352c0fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/89eb19653f42afd80f73c01b18538a7b5352c0fc/StyledTextCtrls.py
charBefore = self.GetCharAt(caretPos - 1) styleBefore = self.GetStyleAt(caretPos - 1)
if old_stc: charBefore = self.GetCharAt(caretPos - 1) styleBefore = ord(self.GetStyleAt(caretPos - 1)) else: charBefore = chr(self.GetCharAt(caretPos - 1)) styleBefore = self.GetStyleAt(caretPos - 1)
def OnUpdateUI(self, evt): # check for matching braces braceAtCaret = -1 braceOpposite = -1 charBefore = None caretPos = self.GetCurrentPos() if caretPos > 0: charBefore = self.GetCharAt(caretPos - 1) styleBefore = self.GetStyleAt(caretPos - 1)
89eb19653f42afd80f73c01b18538a7b5352c0fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/89eb19653f42afd80f73c01b18538a7b5352c0fc/StyledTextCtrls.py
if charBefore and charBefore in "<>[]{}()" and ord(styleBefore) == 10:
if charBefore and charBefore in "<>[]{}()" and styleBefore == 10:
def OnUpdateUI(self, evt): # check for matching braces braceAtCaret = -1 braceOpposite = -1 charBefore = None caretPos = self.GetCurrentPos() if caretPos > 0: charBefore = self.GetCharAt(caretPos - 1) styleBefore = self.GetStyleAt(caretPos - 1)
89eb19653f42afd80f73c01b18538a7b5352c0fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/89eb19653f42afd80f73c01b18538a7b5352c0fc/StyledTextCtrls.py
charAfter = self.GetCharAt(caretPos) styleAfter = self.GetStyleAt(caretPos) if charAfter and charAfter in "<>[]{}()" and ord(styleAfter) == 10:
if old_stc: charAfter = self.GetCharAt(caretPos) styleAfter = ord(self.GetStyleAt(caretPos)) else: charAfter = chr(self.GetCharAt(caretPos)) styleAfter = self.GetStyleAt(caretPos) if charAfter and charAfter in "<>[]{}()" and styleAfter == 10:
def OnUpdateUI(self, evt): # check for matching braces braceAtCaret = -1 braceOpposite = -1 charBefore = None caretPos = self.GetCurrentPos() if caretPos > 0: charBefore = self.GetCharAt(caretPos - 1) styleBefore = self.GetStyleAt(caretPos - 1)
89eb19653f42afd80f73c01b18538a7b5352c0fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/89eb19653f42afd80f73c01b18538a7b5352c0fc/StyledTextCtrls.py
def OnRightClick(self, x, y, keys, attachment): shape = self.GetShape() if not shape.Selected(): self.OnLeftClick(x, y, keys, attachment)
94f17c8628d3e8433d13c7bed64023d54c87c2c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/94f17c8628d3e8433d13c7bed64023d54c87c2c8/OGLViews.py
f = open(filename, 'w') pickle.dump(persProps, f) f.close()
from Explorers.Explorer import openEx t = openEx(filename) t.save(t.resourcepath, pickle.dumps(persProps))
def saveSizes(self, filename): '''Build a picklable dictionary of sizes/positions and save.''' persProps = {}
94f17c8628d3e8433d13c7bed64023d54c87c2c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/94f17c8628d3e8433d13c7bed64023d54c87c2c8/OGLViews.py
f = open(filename, 'r') persProps = pickle.load(f) f.close()
from Explorers.Explorer import openEx t = openEx(filename) persProps = pickle.loads(t.load())
def loadSizes(self, filename): # construct list of non matching
94f17c8628d3e8433d13c7bed64023d54c87c2c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/94f17c8628d3e8433d13c7bed64023d54c87c2c8/OGLViews.py
def loadSizes(self, filename): # construct list of non matching
94f17c8628d3e8433d13c7bed64023d54c87c2c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/94f17c8628d3e8433d13c7bed64023d54c87c2c8/OGLViews.py
def loadSizes(self, filename): # construct list of non matching
94f17c8628d3e8433d13c7bed64023d54c87c2c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/94f17c8628d3e8433d13c7bed64023d54c87c2c8/OGLViews.py
if path.exists(layoutFile):
from Explorers.Explorer import TransportLoadError try:
def refreshCtrl(self): layoutFile = path.splitext(self.model.filename)[0]+self.ext if path.exists(layoutFile): self.canvas.loadSizes(layoutFile)
94f17c8628d3e8433d13c7bed64023d54c87c2c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/94f17c8628d3e8433d13c7bed64023d54c87c2c8/OGLViews.py
def __del__(self): self.cleanup()
94f17c8628d3e8433d13c7bed64023d54c87c2c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/94f17c8628d3e8433d13c7bed64023d54c87c2c8/OGLViews.py
if string.strip(line) == 'Traceback (innermost last):':
if string.strip(line) == tb_id:
def errorList(stderr): errs = [] currerr = [] lines = stderr.readlines() print lines lines.reverse() for line in lines: if string.strip(line) == 'Traceback (innermost last):': errs.append(currerr) currerr = [] else: currerr.append(line) errs.reverse() res = [] for err in errs: err.reverse() res.append(ErrorParser(err)...
7ee3cac39bfb677751dc2f74cc73505ab26060f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/7ee3cac39bfb677751dc2f74cc73505ab26060f2/ErrorStack.py
tb = ['Traceback (innermost last):\n',
tb = [tb_id+'\n',
def readlines(self): return self.data
7ee3cac39bfb677751dc2f74cc73505ab26060f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/7ee3cac39bfb677751dc2f74cc73505ab26060f2/ErrorStack.py
'Traceback (innermost last):\n',
tb_id+'\n',
def readlines(self): return self.data
7ee3cac39bfb677751dc2f74cc73505ab26060f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/7ee3cac39bfb677751dc2f74cc73505ab26060f2/ErrorStack.py
elif self.routeType == 'IndexRoute' and self.compn and len(params):
elif self.routeType == 'IndexRoute' and self.ctrl and len(params):
def getValue(self, *params):
8b0da2d4ee646f83cba67daa03583602447efa8e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/8b0da2d4ee646f83cba67daa03583602447efa8e/RTTI.py
print 'PropWrap setValue', self.name, value, self.routeType
def setValue(self, value, *params): print 'PropWrap setValue', self.name, value, self.routeType if self.routeType == 'CtrlRoute' and self.ctrl: self.setter(self.ctrl, value) elif self.routeType == 'CompnRoute' and self.compn: self.setter(value) elif self.routeType == 'EventRoute' and self.compn and len(params): self.se...
8b0da2d4ee646f83cba67daa03583602447efa8e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/8b0da2d4ee646f83cba67daa03583602447efa8e/RTTI.py
elif self.routeType == 'IndexRoute' and self.compn and len(params):
elif self.routeType == 'IndexRoute' and self.ctrl and len(params):
def setValue(self, value, *params): print 'PropWrap setValue', self.name, value, self.routeType if self.routeType == 'CtrlRoute' and self.ctrl: self.setter(self.ctrl, value) elif self.routeType == 'CompnRoute' and self.compn: self.setter(value) elif self.routeType == 'EventRoute' and self.compn and len(params): self.se...
8b0da2d4ee646f83cba67daa03583602447efa8e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/8b0da2d4ee646f83cba67daa03583602447efa8e/RTTI.py
elif type(self.setter) == MethodType:
if type(self.setter) == MethodType:
def getSetterName(self): from types import FunctionType, MethodType if self.setter: if type(self.setter) == FunctionType: return self.setter.func_name elif type(self.setter) == MethodType: return self.setter.im_func.func_name else: return '' else: return ''
8b0da2d4ee646f83cba67daa03583602447efa8e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/8b0da2d4ee646f83cba67daa03583602447efa8e/RTTI.py
if (type(dict[method]) == FunctionType): prefix = method[:3] property = method[3:]
if _methodTypeCache.has_key( (method, obj) ): return _methodTypeCache[(method, obj)] else: if (type(dict[method]) == FunctionType): prefix = method[:3] property = method[3:] if (method[:2] == '__'): result = ('Built-ins', method, dict[method], dict[method]) elif (prefix == 'Get') and dict.has_key('Set'+property) and p...
def getMethodType(method, obj, dict): """ classify methods according to prefix return category, property name, getter, setter """ if (type(dict[method]) == FunctionType): prefix = method[:3] property = method[3:] if (method[:2] == '__'): return 'Built-ins', method, dict[method], dict[method]
8b0da2d4ee646f83cba67daa03583602447efa8e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/8b0da2d4ee646f83cba67daa03583602447efa8e/RTTI.py
if (method[:2] == '__'): return 'Built-ins', method, dict[method], dict[method] if (prefix == 'Get') and dict.has_key('Set'+property) and property: try: v = dict[method](obj) return 'Properties', property, dict[method], dict['Set'+property] except: return 'Methods', method, dict[method], dict[method] if (prefix == 'S...
return result
def getMethodType(method, obj, dict): """ classify methods according to prefix return category, property name, getter, setter """ if (type(dict[method]) == FunctionType): prefix = method[:3] property = method[3:] if (method[:2] == '__'): return 'Built-ins', method, dict[method], dict[method]
8b0da2d4ee646f83cba67daa03583602447efa8e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/8b0da2d4ee646f83cba67daa03583602447efa8e/RTTI.py
for m in cls.__dict__.keys(): if m not in vetoes: cat, method, methGetter, methSetter = \ getMethodType(m, obj, cls.__dict__) props[cat][method] = (methGetter, methSetter) notDone = len(cls.__bases__) if notDone: cls = cls.__bases__[0]
for m in cls.__dict__.keys(): if m not in vetoes: cat, method, methGetter, methSetter = \ getMethodType(m, obj, cls.__dict__) props[cat][method] = (methGetter, methSetter) notDone = len(cls.__bases__) if notDone: cls = cls.__bases__[0]
def catalogProperty(name, methType, meths, constructors, propLst, constrLst): if constructors.has_key(name): constrLst.append(PropertyWrapper(name, methType, meths[0], meths[1])) else: propLst.append(PropertyWrapper(name, methType, meths[0], meths[1]))
8b0da2d4ee646f83cba67daa03583602447efa8e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/8b0da2d4ee646f83cba67daa03583602447efa8e/RTTI.py
propMeths = props['Properties'][propName] try: catalogProperty(propName, 'CtrlRoute', propMeths, constrNames, propLst, constrLst) except: catalogProperty(propName, 'NoneRoute', (None, None), constrNames, propLst, constrLst)
propMeths = props['Properties'][propName] try: catalogProperty(propName, 'CtrlRoute', propMeths, constrNames, propLst, constrLst) except: catalogProperty(propName, 'NoneRoute', (None, None), constrNames, propLst, constrLst)
def catalogProperty(name, methType, meths, constructors, propLst, constrLst): if constructors.has_key(name): constrLst.append(PropertyWrapper(name, methType, meths[0], meths[1])) else: propLst.append(PropertyWrapper(name, methType, meths[0], meths[1]))
8b0da2d4ee646f83cba67daa03583602447efa8e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/8b0da2d4ee646f83cba67daa03583602447efa8e/RTTI.py
propMeths = xtraProps[propName] try: catalogProperty(propName, propMeths[0], propMeths[1:], constrNames, propLst, constrLst) except: pass propLst.sort() constrLst.sort()
propMeths = xtraProps[propName] try: catalogProperty(propName, propMeths[0], propMeths[1:], constrNames, propLst, constrLst) except: pass propLst.sort() constrLst.sort()
def catalogProperty(name, methType, meths, constructors, propLst, constrLst): if constructors.has_key(name): constrLst.append(PropertyWrapper(name, methType, meths[0], meths[1])) else: propLst.append(PropertyWrapper(name, methType, meths[0], meths[1]))
8b0da2d4ee646f83cba67daa03583602447efa8e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/8b0da2d4ee646f83cba67daa03583602447efa8e/RTTI.py
propMeths = xtraProps[propName] try: catalogProperty(propName, propMeths[0], propMeths[1:], constrNames, propLst, constrLst) except: pass
propMeths = xtraProps[propName] try: catalogProperty(propName, propMeths[0], propMeths[1:], constrNames, propLst, constrLst) except: pass
def catalogProperty(name, methType, meths, constructors, propLst, constrLst): if constructors.has_key(name): constrLst.append(PropertyWrapper(name, methType, meths[0], meths[1])) else: propLst.append(PropertyWrapper(name, methType, meths[0], meths[1]))
8b0da2d4ee646f83cba67daa03583602447efa8e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/8b0da2d4ee646f83cba67daa03583602447efa8e/RTTI.py
def save(self, filename, data):
def save(self, filename, data, mode='wb'):
def save(self, filename, data): """ Saves contents of data to Zope """ try: self.getResource().PUT({'BODY':data}) except xmlrpclib.ProtocolError, error: # Getting a zero content warning is not an error if error.errcode != 204: raise ExplorerNodes.TransportSaveError(error, filename) except Exception, error: raise Explor...
6beb670f6d8e2dee113a1c6c5b6d646211f5dc67 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/6beb670f6d8e2dee113a1c6c5b6d646211f5dc67/ZopeExplorer.py
def save(self, filename, data):
def save(self, filename, data, mode='wb'):
def save(self, filename, data): self.getResource().manage_edit(self.name, self.getParams(data), self.getBody(data))
6beb670f6d8e2dee113a1c6c5b6d646211f5dc67 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/6beb670f6d8e2dee113a1c6c5b6d646211f5dc67/ZopeExplorer.py
parent.AddPage(bSelect = true, imageId = -1, pPage = self.htmlWindow, strText = 'Response') parent.AddPage(bSelect = false, imageId = -1, pPage = self.textCtrl, strText = 'Source')
parent.AddPage(select = true, imageId = -1, page = self.htmlWindow, text = 'Response') parent.AddPage(select = false, imageId = -1, page = self.textCtrl, text = 'Source')
def _init_coll_notebook1_Pages(self, parent): # generated method, don't edit
2f1d052cbb74502452ba75108829228f47237b8d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2f1d052cbb74502452ba75108829228f47237b8d/HTMLResponse.py