rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
"""Return the object in ISO standard format | """ Return the object in ISO standard format | def ISO(): """Return the object in ISO standard format | b8c350cc5b36f5ce907db3ed0e2c54460ed7de1c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/b8c350cc5b36f5ce907db3ed0e2c54460ed7de1c/DateTime.py |
"""Return the object in the format used in the HTML4.0 specification, one of the standard forms in ISO8601. See http://www.w3.org/TR/NOTE-datetime | """ Return the object in the format used in the HTML4.0 specification, one of the standard forms in ISO8601. See "HTML 4.0 Specification":http://www.w3.org/TR/NOTE-datetime | def HTML4(): """Return the object in the format used in the HTML4.0 specification, one of the standard forms in ISO8601. See http://www.w3.org/TR/NOTE-datetime | b8c350cc5b36f5ce907db3ed0e2c54460ed7de1c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/b8c350cc5b36f5ce907db3ed0e2c54460ed7de1c/DateTime.py |
T, Z are literal characters. The time is in UTC. """ | T, Z are literal characters. The time is in UTC. Permission -- Always available """ | def HTML4(): """Return the object in the format used in the HTML4.0 specification, one of the standard forms in ISO8601. See http://www.w3.org/TR/NOTE-datetime | b8c350cc5b36f5ce907db3ed0e2c54460ed7de1c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/b8c350cc5b36f5ce907db3ed0e2c54460ed7de1c/DateTime.py |
n=lower(name) if n != name: aliases.append((n, SQLAlias(name))) n=upper(name) if n != name: aliases.append((n, SQLAlias(name))) | schema[lower(name)]=i schema(upper(name)]=i | def __init__(self,file,brains=NoBrains, parent=None, zbrains=None): | d9587ee84b12f1cdd7c93acf5416db6695c45d54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/d9587ee84b12f1cdd7c93acf5416db6695c45d54/RDB.py |
d=r.__dict__ for k, v in aliases: if not hasattr(r,k): d[k]=v | for _def in defs: _def=strip(_def) if not _def: raise ValueError, ('Empty column definition for %s' % names[i]) if defre.match(_def) < 0: raise ValueError, ( 'Invalid column definition for, %s, for %s' % _def, names[i]) type=lower(defre.group(2)) width=defre.group(1) if width: width=atoi(width) else: width=8 | d9587ee84b12f1cdd7c93acf5416db6695c45d54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/d9587ee84b12f1cdd7c93acf5416db6695c45d54/RDB.py | |
if REQUEST: return self.manage_main(self,REQUEST) | if REQUEST is not None: REQUEST['RESPONSE'].redirect(self.absolute_url()+'/manage_main') | def add(self, id, title='', smtp_host=None, smtp_port=25, REQUEST=None): ' add a MailHost into the system ' id=str(id) title=str(title) if smtp_host is not None: smtp_host=str(smtp_host) if type(smtp_port) is not type(1): smtp_port=string.atoi(smtp_port) i=MailHost() #create new mail host i.id=id ... | 330c85b275043ab1490778c815b72a02e1126449 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/330c85b275043ab1490778c815b72a02e1126449/MailHost.py |
if file: | if file and (type(file) is type('') or hasattr(file, 'content-type')): | def manage_edit(self, meta_type='', icon='', file='', REQUEST=None): """Set basic item properties. """ if meta_type: self.setClassAttr('meta_type', meta_type) | 80e1b4f2e0678811c1574140a7711a12624922f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/80e1b4f2e0678811c1574140a7711a12624922f0/Basic.py |
return "text/" + (html_re.search(s) >= 0 and 'html' or 'plain') | if (lower(strip(s)[:6]) == '<html>' or find(s, '</') > 0): return 'text/html' return 'text/plain' | def text_type(s): return "text/" + (html_re.search(s) >= 0 and 'html' or 'plain') | a4036ced64653b36f02a710f625fef6133c00d75 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/a4036ced64653b36f02a710f625fef6133c00d75/content_types.py |
ex=fn[(rfind(fn,'.')+1):] if self._extmap.has_key(ex): ct=self._extmap[ex] else: ct=self._extmap[''] | ex=lower(fn[(rfind(fn,'.')+1):]) if self._extmap.has_key(ex): ct=self._extmap[ex] else: ct=self._extmap[''] | def __init__(self,*args): c=len(args) if c==1: name,val=None,args[0] elif c==2: name,val=args[0],args[1] else: raise ValueError, 'Invalid arguments' | df9e6f8bd821a6326d9006ae4da495922d7f54bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/df9e6f8bd821a6326d9006ae4da495922d7f54bb/Client.py |
else: v=open(v) | else: v=open(v, 'rb') | def main(): import getopt from string import split user=None try: optlist, args = getopt.getopt(sys.argv[1:],'u:') url=args[0] u =filter(lambda o: o[0]=='-u', optlist) if u: [user, pw] = split(u[0][1],':') kw={} for arg in args[1:]: [name,v]=split(arg,'=') if name[-5:]==':file': name=name[:-5] if v=='-': v=sys.stdin... | df9e6f8bd821a6326d9006ae4da495922d7f54bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/df9e6f8bd821a6326d9006ae4da495922d7f54bb/Client.py |
f = self.quick_dispatch[t] | f = self.dispatch[t] | def save(self, object, pers_save = 0): memo = self.memo | 971792dafe584efc723c3014ded6af302d155a6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/971792dafe584efc723c3014ded6af302d155a6f/pickle.py |
if memo.has_key(d): self.write(self.get(memo[d])) | pid = self.inst_persistent_id(object) if pid is not None: self.save_pers(pid) | def save(self, object, pers_save = 0): memo = self.memo | 971792dafe584efc723c3014ded6af302d155a6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/971792dafe584efc723c3014ded6af302d155a6f/pickle.py |
f = self.dispatch[t] | reduce = dispatch_table[t] | def save(self, object, pers_save = 0): memo = self.memo | 971792dafe584efc723c3014ded6af302d155a6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/971792dafe584efc723c3014ded6af302d155a6f/pickle.py |
pid = self.inst_persistent_id(object) if pid is not None: self.save_pers(pid) return | def save(self, object, pers_save = 0): memo = self.memo | 971792dafe584efc723c3014ded6af302d155a6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/971792dafe584efc723c3014ded6af302d155a6f/pickle.py | |
reduce = dispatch_table[t] except KeyError: try: reduce = object.__reduce__ except AttributeError: raise PicklingError, \ "can't pickle %s objects" % `t.__name__` else: tup = reduce() | reduce = object.__reduce__ except AttributeError: raise PicklingError, \ "can't pickle %s objects" % `t.__name__` | def save(self, object, pers_save = 0): memo = self.memo | 971792dafe584efc723c3014ded6af302d155a6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/971792dafe584efc723c3014ded6af302d155a6f/pickle.py |
tup = reduce(object) if (type(tup) is not TupleType): raise PicklingError, "Value returned by %s must be a " \ "tuple" % reduce l = len(tup) | tup = reduce() else: tup = reduce(object) if (type(tup) is not TupleType): raise PicklingError, "Value returned by %s must be a " \ "tuple" % reduce l = len(tup) | def save(self, object, pers_save = 0): memo = self.memo | 971792dafe584efc723c3014ded6af302d155a6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/971792dafe584efc723c3014ded6af302d155a6f/pickle.py |
if ((l != 2) and (l != 3)): raise PicklingError, "tuple returned by %s must contain " \ "only two or three elements" % reduce callable = tup[0] arg_tup = tup[1] | if ((l != 2) and (l != 3)): raise PicklingError, "tuple returned by %s must contain " \ "only two or three elements" % reduce callable = tup[0] arg_tup = tup[1] | def save(self, object, pers_save = 0): memo = self.memo | 971792dafe584efc723c3014ded6af302d155a6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/971792dafe584efc723c3014ded6af302d155a6f/pickle.py |
if (l > 2): state = tup[2] else: state = None if (type(arg_tup) is not TupleType): raise PicklingError, "Second element of tuple returned " \ "by %s must be a tuple" % reduce self.save_reduce(callable, arg_tup, state) return | if (l > 2): state = tup[2] else: state = None if (type(arg_tup) is not TupleType): raise PicklingError, "Second element of tuple returned " \ "by %s must be a tuple" % reduce self.save_reduce(callable, arg_tup, state) return | def save(self, object, pers_save = 0): memo = self.memo | 971792dafe584efc723c3014ded6af302d155a6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/971792dafe584efc723c3014ded6af302d155a6f/pickle.py |
quick_dispatch = {} | def save_reduce(self, callable, arg_tup, state = None): write = self.write save = self.save | 971792dafe584efc723c3014ded6af302d155a6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/971792dafe584efc723c3014ded6af302d155a6f/pickle.py | |
quick_dispatch[NoneType] = save_none | dispatch[NoneType] = save_none | def save_none(self, object): self.write(NONE) | 971792dafe584efc723c3014ded6af302d155a6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/971792dafe584efc723c3014ded6af302d155a6f/pickle.py |
quick_dispatch[IntType] = save_int | dispatch[IntType] = save_int | def save_int(self, object): if (self.bin): i = mdumps(object)[1:] if (i[-2:] == '\000\000'): if (i[-3] == '\000'): self.write(BININT1 + i[:-3]) return | 971792dafe584efc723c3014ded6af302d155a6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/971792dafe584efc723c3014ded6af302d155a6f/pickle.py |
quick_dispatch[FloatType] = save_float | dispatch[FloatType] = save_float | def save_float(self, object): self.write(FLOAT + `object` + '\n') | 971792dafe584efc723c3014ded6af302d155a6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/971792dafe584efc723c3014ded6af302d155a6f/pickle.py |
d = id(object) | def save_tuple(self, object): d = id(object) | 971792dafe584efc723c3014ded6af302d155a6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/971792dafe584efc723c3014ded6af302d155a6f/pickle.py | |
write(POP * len(object)) write(self.get(memo[d])) | write(POP * len(object) + self.get(memo[d])) | def save_tuple(self, object): d = id(object) | 971792dafe584efc723c3014ded6af302d155a6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/971792dafe584efc723c3014ded6af302d155a6f/pickle.py |
using_appends = (self.bin and (len(object) > 1)) if (using_appends): write(MARK + LIST + MARK) | if (self.bin): write(EMPTY_LIST) | def save_list(self, object): d = id(object) | 971792dafe584efc723c3014ded6af302d155a6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/971792dafe584efc723c3014ded6af302d155a6f/pickle.py |
using_setitems = (self.bin and (len(object) > 1)) if (using_setitems): write(MARK + DICT + MARK) | if (self.bin): write(EMPTY_DICT) | def save_dict(self, object): d = id(object) | 971792dafe584efc723c3014ded6af302d155a6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/971792dafe584efc723c3014ded6af302d155a6f/pickle.py |
if name != '__main__' and \ hasattr(module, clsname) and \ getattr(module, clsname) is cls: | if hasattr(module, clsname) and \ getattr(module, clsname) is cls: | def whichmodule(cls, clsname): """Figure out the module in which a class occurs. Search sys.modules for the module. Cache in classmap. Return a module name. If the class cannot be found, return __main__. """ if classmap.has_key(cls): return classmap[cls] import sys for name, module in sys.modules.items(): if name != ... | 971792dafe584efc723c3014ded6af302d155a6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/971792dafe584efc723c3014ded6af302d155a6f/pickle.py |
len = mloads('i' + self.read(1)) | len = mloads('i' + self.read(1) + '\000\000\000') | def load_short_binstring(self): len = mloads('i' + self.read(1)) self.append(self.read(len)) | 971792dafe584efc723c3014ded6af302d155a6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/971792dafe584efc723c3014ded6af302d155a6f/pickle.py |
(8, Dummy('g', date(2034,2,5))), (9, Dummy('h', datetime(2034,2,5,15,17,5))), | (8, Dummy('g', date(2034,2,5))), (9, Dummy('h', datetime(2034,2,5,15,20,5))), | def setUp(self): self._values = ( (0, Dummy('a', None)), # None (1, Dummy('b', DateTime(0))), # 1055335680 (2, Dummy('c', DateTime('2002-05-08 15:16:17'))), # 1072667236 (3, Dummy('d', DateTime('2032-05-08 15:16:17'))), # 1088737636 (4, Dummy('e', DateTime('2062-05-08 15:1... | 830b6bd4d2ef80d72e6fa4b86e45995cdca416da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/830b6bd4d2ef80d72e6fa4b86e45995cdca416da/test_DateIndex.py |
tzinfo=Eastern))), | tzinfo=Eastern))), | def setUp(self): self._values = ( (0, Dummy('a', None)), # None (1, Dummy('b', DateTime(0))), # 1055335680 (2, Dummy('c', DateTime('2002-05-08 15:16:17'))), # 1072667236 (3, Dummy('d', DateTime('2032-05-08 15:16:17'))), # 1088737636 (4, Dummy('e', DateTime('2062-05-08 15:1... | 830b6bd4d2ef80d72e6fa4b86e45995cdca416da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/830b6bd4d2ef80d72e6fa4b86e45995cdca416da/test_DateIndex.py |
try: self._p_jar.cache.incrgc() | try: self._p_jar.cache.incrgc() | def __bobo_traverse__(self, REQUEST, name=None): | 6560c3a0f864741509f002726a9d05089db0cfe5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/6560c3a0f864741509f002726a9d05089db0cfe5/Application.py |
if bobobase is None: return 1 | safe=bobobase.has_key('Application') | def lic_check(product_name): path_join =os.path.join product_dir=path_join(SOFTWARE_HOME,'lib/python/Products') package_dir=path_join(product_dir, product_name) bobobase =Globals.Bobobase if bobobase is None: return 1 try: f=open(path_join(package_dir,'%s.lic' % product_name), 'rb') except: try: product=getattr(__im... | 6560c3a0f864741509f002726a9d05089db0cfe5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/6560c3a0f864741509f002726a9d05089db0cfe5/Application.py |
get_transaction().commit() | if safe: get_transaction().commit() | def lic_check(product_name): path_join =os.path.join product_dir=path_join(SOFTWARE_HOME,'lib/python/Products') package_dir=path_join(product_dir, product_name) bobobase =Globals.Bobobase if bobobase is None: return 1 try: f=open(path_join(package_dir,'%s.lic' % product_name), 'rb') except: try: product=getattr(__im... | 6560c3a0f864741509f002726a9d05089db0cfe5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/6560c3a0f864741509f002726a9d05089db0cfe5/Application.py |
get_transaction().commit() | if safe: get_transaction().commit() | def lic_check(product_name): path_join =os.path.join product_dir=path_join(SOFTWARE_HOME,'lib/python/Products') package_dir=path_join(product_dir, product_name) bobobase =Globals.Bobobase if bobobase is None: return 1 try: f=open(path_join(package_dir,'%s.lic' % product_name), 'rb') except: try: product=getattr(__im... | 6560c3a0f864741509f002726a9d05089db0cfe5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/6560c3a0f864741509f002726a9d05089db0cfe5/Application.py |
buf = ("------\n" "%s %s %s %s\n%s" % (log_time(), severity_string(severity), subsystem, summary, detail)) else: buf = ("------\n" "%s %s %s %s" % (log_time(), severity_string(severity), subsystem, summary)) print >> _log_dest, buf | buf.append(str(detail)) | def log(self, subsystem, severity, summary, detail, error): if _log_dest is None or severity < _log_level: return | c2b166296200c88d7d5db513cb32eae27bebbf41 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/c2b166296200c88d7d5db513cb32eae27bebbf41/MinimalLogger.py |
print >> _log_dest, ''.join(lines) except: print >> _log_dest, "%s: %s" % error[:2] | buf.append(''.join(lines)) except '': buf.append("%s: %s" % error[:2]) buf.append("") _log_dest.write("\n".join(buf)) | def log(self, subsystem, severity, summary, detail, error): if _log_dest is None or severity < _log_level: return | c2b166296200c88d7d5db513cb32eae27bebbf41 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/c2b166296200c88d7d5db513cb32eae27bebbf41/MinimalLogger.py |
DocBookBook=DocBookClass.DocBookBook | DocBookBook=DocBookClass.DocBookBook() | def HTML(src, level=0, type=type, StringType=type('')): if type(src) is StringType: return ClassicHTML(src, level) return HTMLNG(src, level) | 1b24f247ebeb56949b3622db9538094469563c1a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/1b24f247ebeb56949b3622db9538094469563c1a/__init__.py |
copy=self.__class__(self.id, self.title, bases) | copy=self.__class__(self.id, self.title, bases, hasattr(self._zclass_, '_p_deactivate') ) | def _setBasesHoldOnToYourButts(self, bases): # Eeeek copy=self.__class__(self.id, self.title, bases) | 2db44df90f1fc5bad19b747f904c6a32321cd819 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/2db44df90f1fc5bad19b747f904c6a32321cd819/ZClass.py |
URLmatch=regex.compile('URL[0-9]$').match, BASEmatch=regex.compile('BASE[0-9]$').match, | URLmatch=regex.compile('URL[0-9]+$').match, BASEmatch=regex.compile('BASE[0-9]+$').match, | def __getitem__(self,key, default=_marker, # Any special internal marker will do URLmatch=regex.compile('URL[0-9]$').match, BASEmatch=regex.compile('BASE[0-9]$').match, ): """Get a variable value | 14717654d6c896278c14ffe2f422b8fd67e1c093 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/14717654d6c896278c14ffe2f422b8fd67e1c093/HTTPRequest.py |
n=ord(key[3])-ord('0') | n=atoi(key[3:]) | def __getitem__(self,key, default=_marker, # Any special internal marker will do URLmatch=regex.compile('URL[0-9]$').match, BASEmatch=regex.compile('BASE[0-9]$').match, ): """Get a variable value | 14717654d6c896278c14ffe2f422b8fd67e1c093 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/14717654d6c896278c14ffe2f422b8fd67e1c093/HTTPRequest.py |
n=ord(key[4])-ord('0') | n=atoi(key[4:]) | def __getitem__(self,key, default=_marker, # Any special internal marker will do URLmatch=regex.compile('URL[0-9]$').match, BASEmatch=regex.compile('BASE[0-9]$').match, ): """Get a variable value | 14717654d6c896278c14ffe2f422b8fd67e1c093 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/14717654d6c896278c14ffe2f422b8fd67e1c093/HTTPRequest.py |
if self.environ.get('SCRIPT_NAME',''): n=n-1 | n=n-1 | def __getitem__(self,key, default=_marker, # Any special internal marker will do URLmatch=regex.compile('URL[0-9]$').match, BASEmatch=regex.compile('BASE[0-9]$').match, ): """Get a variable value | 14717654d6c896278c14ffe2f422b8fd67e1c093 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/14717654d6c896278c14ffe2f422b8fd67e1c093/HTTPRequest.py |
lasturl = "" for n in "0123456789": key = "URL%s"%n try: if lasturl != self[key]: keys[key] = 1 lasturl = self[key] else: break except KeyError: pass for n in "0123456789": key = "BASE%s"%n try: if lasturl != self[key]: keys[key] = 1 lasturl = self[key] else: break except KeyError: pass return keys.keys() | keys=keys.keys() keys.sort() return keys | def keys(self): keys = {} keys.update(self.common) | 14717654d6c896278c14ffe2f422b8fd67e1c093 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/14717654d6c896278c14ffe2f422b8fd67e1c093/HTTPRequest.py |
except AttributeError, KeyError: akey = None | except (AttributeError, KeyError): akey = None | def sort(sequence, sort=(), _=None, mapping=0): """ - sequence is a sequence of objects to be sorted - sort is a sequence of tuples (key,func,direction) that define the sort order: - key is the name of an attribute to sort the objects by - func is the name of a comparison function. This parameter is optional allowe... | 72ae253aa5ea1704714334b5aa865c18c32840b2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/72ae253aa5ea1704714334b5aa865c18c32840b2/SortEx.py |
for i in query(key,self).keys(): rr.insert(i) | for i,score in query(key,self).items(): if score: rr.insert(i) | def _apply_index(self, request, cid='', ListType=[]): | 4ddbd1b59bf5e901ed147cf779f71eb42cfd362b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4ddbd1b59bf5e901ed147cf779f71eb42cfd362b/TextIndex.py |
d=lp=len(p) | d=lp=9999 | def near(self, x): result = {} | 4ddbd1b59bf5e901ed147cf779f71eb42cfd362b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4ddbd1b59bf5e901ed147cf779f71eb42cfd362b/TextIndex.py |
for i in range(1, len(splitted), 2): splitted[i] = filter(None, split(splitted[i])) for j in range(1, len(splitted[i])): | for i in range(1,len(splitted),2): splitted[i] = filter(None, split(splitted[i])) for j in range(1, len(splitted[i])): | def quotes(s, ws = (string.whitespace,)): # split up quoted regions splitted = regsub.split(s, '[%s]*\"[%s]*' % (ws * 2)) split=string.split if (len(splitted) > 1): if ((len(splitted) % 2) == 0): raise QueryError, "Mismatched quotes" for i in range(1, len(splitted), 2): # split the quoted region into words splitted[i... | 4ddbd1b59bf5e901ed147cf779f71eb42cfd362b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4ddbd1b59bf5e901ed147cf779f71eb42cfd362b/TextIndex.py |
def get_operands(q, i, index, ListType=type([])): | def get_operands(q, i, index, ListType=type([]), StringType=type('')): | def get_operands(q, i, index, ListType=type([])): '''Evaluate and return the left and right operands for an operator''' try: left = q[i - 1] right = q[i + 1] except IndexError: raise QueryError, "Malformed query" if (type(left) is ListType): left = evaluate(left, index) else: left=index[left] if (type(right) is List... | 4ddbd1b59bf5e901ed147cf779f71eb42cfd362b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4ddbd1b59bf5e901ed147cf779f71eb42cfd362b/TextIndex.py |
if (type(left) is ListType): left = evaluate(left, index) else: left=index[left] if (type(right) is ListType): right = evaluate(right, index) else: right = index[right] | t=type(left) if t is ListType: left = evaluate(left, index) elif t is StringType: left=index[left] t=type(right) if t is ListType: right = evaluate(right, index) elif t is StringType: right=index[right] | def get_operands(q, i, index, ListType=type([])): '''Evaluate and return the left and right operands for an operator''' try: left = q[i - 1] right = q[i + 1] except IndexError: raise QueryError, "Malformed query" if (type(left) is ListType): left = evaluate(left, index) else: left=index[left] if (type(right) is List... | 4ddbd1b59bf5e901ed147cf779f71eb42cfd362b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4ddbd1b59bf5e901ed147cf779f71eb42cfd362b/TextIndex.py |
'ours', 'ourselves', 'out', 'over', 'own', 'part', 'per', 'perhaps', | 'ours', 'ourselves', 'out', 'over', 'own', 'per', 'perhaps', | def evaluate(q, index,ListType=type([])): '''Evaluate a parsed query''' if (len(q) == 1): if (type(q[0]) is ListType): return evaluate(q[0], index) return index[q[0]] i = 0 while (i < len(q)): if q[i] is AndNot: left, right = get_operands(q, i, index) val = left.and_not(right) q[(i - 1) : (i + 2)] = [ val ] else: i ... | 4ddbd1b59bf5e901ed147cf779f71eb42cfd362b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4ddbd1b59bf5e901ed147cf779f71eb42cfd362b/TextIndex.py |
get_size=getSize | def getSize(self): """Get the size of a file or image. | 60d2408c7804e52f727045b38570996fdb2c6719 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/60d2408c7804e52f727045b38570996fdb2c6719/Image.py | |
self.base="%s/%s" % (server_url,b) | if b: self.base="%s/%s" % (server_url,b) else: self.base=server_url | def __init__(self, stdin, environ, response, clean=0): # Avoid the overhead of scrubbing the environment in the # case of request cloning for traversal purposes. If the # clean flag is set, we know we can use the passed in # environ dict directly. | 9a1697da19bc6bf056b678c17b0069e43f49662d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/9a1697da19bc6bf056b678c17b0069e43f49662d/HTTPRequest.py |
self=self.__of__(container) | if vocab_id is not None and container is None: raise CatalogError, ("You cannot specify a vocab_id without " "also specifying a container.") if container is not None: self=self.__of__(container) | def __init__(self, id, title='', vocab_id=None, container=None): self=self.__of__(container) self.id=id self.title=title self.threshold = 10000 self._v_total = 0 | 167a4f4e8583e7e72f8ebb7c8c434f8b2d379193 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/167a4f4e8583e7e72f8ebb7c8c434f8b2d379193/ZCatalog.py |
pid=product.id | def _manage_add_product_permission( self, product, permission, methods=(), default=('Manager',) ): | 1999718b79917aabe57ded9ad7e4308ca0b0e94e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/1999718b79917aabe57ded9ad7e4308ca0b0e94e/ProductRegistry.py | |
if not d.has_key('product'): d['product']=pid if d['product'] != pid: raise 'Type Exists', ( 'The permission <em>%s</em> is already defined.' % permission) d['methods']=methods d['default']=default return d={'name': permission, 'methods': methods, 'default': default} if permission: d['permission']=permission self._se... | raise 'Type Exists', ( 'The permission <em>%s</em> is already defined.' % permission) d={'name': permission, 'methods': methods, 'permission': permission, 'default': default, 'product': product.id} self._setProductRegistryData('permissions', permissions + (d,)) | def _manage_add_product_permission( self, product, permission, methods=(), default=('Manager',) ): | 1999718b79917aabe57ded9ad7e4308ca0b0e94e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/1999718b79917aabe57ded9ad7e4308ca0b0e94e/ProductRegistry.py |
def field2text(v, nl=re.compile('\r\n\|\n\r').search): | def field2text(v, nl=re.compile('\r\n|\n\r').search): | def field2text(v, nl=re.compile('\r\n\|\n\r').search): if hasattr(v,'read'): v=v.read() else: v=str(v) mo = nl(v) if mo is None: return v l = mo.start(0) r=[] s=0 while l >= s: r.append(v[s:l]) s=l+2 mo=nl(v,s) if mo is None: l=-1 else: l=mo.start(0) r.append(v[s:]) return join(r,'\n') | fde9020ddb0f73b7c6f3ffd56de513c6fbc9126e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/fde9020ddb0f73b7c6f3ffd56de513c6fbc9126e/Converters.py |
return '\n <n:lockentry>\n' \ ' <d:lockscope><d:exclusive/></d:lockscope>\n' \ ' <d:locktype><d:write/></d:locktype>\n' \ ' </n:lockentry>\n ' | vself = self.v_self() out = '\n' if WriteLockInterface.isImplementedBy(vself): out += (' <n:lockentry>\n' ' <d:lockscope><d:exclusive/></d:lockscope>\n' ' <d:locktype><d:write/></d:locktype>\n' ' </n:lockentry>\n ') return out | def dav__supportedlock(self): return '\n <n:lockentry>\n' \ ' <d:lockscope><d:exclusive/></d:lockscope>\n' \ ' <d:locktype><d:write/></d:locktype>\n' \ ' </n:lockentry>\n ' | bf1ee86ca7a7cf19803c6b1deb9d9e917824faed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/bf1ee86ca7a7cf19803c6b1deb9d9e917824faed/PropertySheets.py |
path=REQUEST['SCRIPT_NAME'], | path=(REQUEST['BASEPATH1'] or '/'), | def enter(self, REQUEST, RESPONSE): """Begin working in a version""" RESPONSE.setCookie( Globals.VersionNameName, self.cookie, path=REQUEST['SCRIPT_NAME'], ) if (REQUEST.has_key('SERVER_SOFTWARE') and REQUEST['SERVER_SOFTWARE'][:9]=='Microsoft'): # IIS doesn't handle redirect headers correctly return MessageDialog( act... | b09775f305024b846c82502c8837ea008f845f33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/b09775f305024b846c82502c8837ea008f845f33/Version.py |
func_defaults = ComputedAttribute(lambda self: self._v_func_defaults) func_code = ComputedAttribute(lambda self: self._v_func_code) | func_defaults = ComputedAttribute(lambda self: self.getFuncDefaults()) func_code = ComputedAttribute(lambda self: self.getFuncCode()) | def manage_addExternalMethod(self, id, title, module, function, REQUEST=None): """Add an external method to a folder Un addition to the standard object-creation arguments, 'id' and title, the following arguments are defined: function -- The name of the python function. This can be a an ordinary Python function, or a ... | 58331c88441a6815ad0ae9623947f02922399471 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/58331c88441a6815ad0ae9623947f02922399471/ExternalMethod.py |
def getFunction(self, reload=0): | 58331c88441a6815ad0ae9623947f02922399471 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/58331c88441a6815ad0ae9623947f02922399471/ExternalMethod.py | ||
def reloadIfChanged(self): ts=os.stat(self.filepath())[stat.ST_MTIME] if (not hasattr(self, '_v_last_read') or (ts != self._v_last_read)): self._v_f=self.getFunction(1) self._v_last_read=ts if DevelopmentMode: def getFuncDefaults(self): self.reloadIfChanged() if not hasattr(self, '_v_func_defaults'): self._v_f = se... | def getFunction(self, reload=0): | 58331c88441a6815ad0ae9623947f02922399471 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/58331c88441a6815ad0ae9623947f02922399471/ExternalMethod.py | |
def __call__(self, *args, **kw): """Call an ExternalMethod | 58331c88441a6815ad0ae9623947f02922399471 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/58331c88441a6815ad0ae9623947f02922399471/ExternalMethod.py | ||
ts=os.stat(self.filepath())[stat.ST_MTIME] if (not hasattr(self, '_v_last_read') or (ts != self._v_last_read)): self._v_f=self.getFunction(1) self._v_last_read=ts | self.reloadIfChanged() | def __call__(self, *args, **kw): """Call an ExternalMethod | 58331c88441a6815ad0ae9623947f02922399471 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/58331c88441a6815ad0ae9623947f02922399471/ExternalMethod.py |
def version_txt(self): | def version_txt(): | def version_txt(self): try: return open(os.path.join(SOFTWARE_HOME,'version.txt')).read() except: return '(unreleased version)' return self._v_version_txt | 08403910827a85754dd286f4e6fc34962c4dfdb1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/08403910827a85754dd286f4e6fc34962c4dfdb1/ApplicationManager.py |
CreateFactory=1) | CreateAFactory=1) | def __class_init__(self): pass | ed17f39764de88ba31bb7e5e8066416d4fed2d58 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/ed17f39764de88ba31bb7e5e8066416d4fed2d58/ZClass.py |
if CreateFactory and meta_type: | if CreateAFactory and meta_type: | def manage_addZClass(self, id, title='', baseclasses=[], meta_type='', CreateAFactory=0, REQUEST=None): """Add a Z Class """ bases=[] for b in baseclasses: if Products.meta_classes.has_key(b): bases.append(Products.meta_classes[b]) else: base=find_class(self, b) bases.append(base) Z=ZClass(id,title,bases) if meta_typ... | ed17f39764de88ba31bb7e5e8066416d4fed2d58 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/ed17f39764de88ba31bb7e5e8066416d4fed2d58/ZClass.py |
$Id: Publish.py,v 1.17 1996/08/30 17:08:53 jfulton Exp $""" | $Id: Publish.py,v 1.18 1996/08/30 23:40:40 jfulton Exp $""" | def taste(spam): "a favorable reviewer" return spam,'yum yum, I like ' + spam | dd8f0382d4a94b6d1ee97592d30969acccafcfcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/dd8f0382d4a94b6d1ee97592d30969acccafcfcf/Publish.py |
__version__='$Revision: 1.17 $'[11:-2] | __version__='$Revision: 1.18 $'[11:-2] | def taste(spam): "a favorable reviewer" return spam,'yum yum, I like ' + spam | dd8f0382d4a94b6d1ee97592d30969acccafcfcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/dd8f0382d4a94b6d1ee97592d30969acccafcfcf/Publish.py |
result.write('<d:response>\n<d:href>%s</d:href>\n' % url) | result.write('<d:response>\n<d:href>%s</d:href>\n' % quote(url)) | def apply(self, obj, url=None, depth=0, result=None, top=1): if result is None: result=StringIO() depth=self.depth url=urlfix(self.request['URL'], 'PROPFIND') url=urlbase(url) result.write('<?xml version="1.0" encoding="utf-8"?>\n' \ '<d:multistatus xmlns:d="DAV:">\n') iscol=hasattr(obj, '__dav_collection__') if iscol ... | dd51a8080733d3cc2744f08686ba282e4b49317b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/dd51a8080733d3cc2744f08686ba282e4b49317b/davcmds.py |
'<d:href>%s</d:href>\n' % url) | '<d:href>%s</d:href>\n' % quote(url)) | def apply(self, obj): url=urlfix(self.request['URL'], 'PROPPATCH') if hasattr(obj, '__dav_collection__'): url=url+'/' result=StringIO() errors=[] result.write('<?xml version="1.0" encoding="utf-8"?>\n' \ '<d:multistatus xmlns:d="DAV:">\n' \ '<d:response>\n' \ '<d:href>%s</d:href>\n' % url) propsets=obj.propertysheets f... | dd51a8080733d3cc2744f08686ba282e4b49317b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/dd51a8080733d3cc2744f08686ba282e4b49317b/davcmds.py |
if hasattr(self, 'aq_base') and hasattr(self.aq_base, 'index_html'): | if hasattr(self, 'index_html'): | def HEAD(self, REQUEST, RESPONSE): """Retrieve resource information without a response body.""" self.dav__init(REQUEST, RESPONSE) if hasattr(self, 'aq_base') and hasattr(self.aq_base, 'index_html'): if hasattr(self.index_html, 'HEAD'): return self.index_html.HEAD(REQUEST, RESPONSE) raise 'Method Not Allowed', ( 'Method... | 97e3d8562343dbb5e8e14805129c887ed57b9c77 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/97e3d8562343dbb5e8e14805129c887ed57b9c77/Collection.py |
def __str__(self): return self.name | e71adc76453e97819cef8a6aa0f2a7d240bc9c83 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/e71adc76453e97819cef8a6aa0f2a7d240bc9c83/User.py | ||
prev_id=Moniker.absattr(obj.id) | try: r=obj.aq_parent._reserved_names except: r=() if prev_id in special: raise 'NotSupported', eNotSupported | def manage_paste(self, moniker, clip_id, REQUEST=None): """ """ | da429ab2d9bbb38922ecd94cd774b331679794dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/da429ab2d9bbb38922ecd94cd774b331679794dd/CopySupport.py |
if type(keys) is not ListType: keys=[keys] | if type(keys) is type(''): if not keys or not strip(keys): return None keys=[keys] | def _apply_index(self, request, cid='', ListType=[]): | c6fb076591e9ec507cf51843363f406b3b21db9c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/c6fb076591e9ec507cf51843363f406b3b21db9c/TextIndex.py |
return intSet(), (id,) | def _apply_index(self, request, cid='', ListType=[]): | c6fb076591e9ec507cf51843363f406b3b21db9c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/c6fb076591e9ec507cf51843363f406b3b21db9c/TextIndex.py | |
if password is not None and self.encrypt_passwords: | if password is not None and self.encrypt_passwords \ and not self._isPasswordEncrypted(password): | def _doAddUser(self, name, password, roles, domains, **kw): """Create a new user""" if password is not None and self.encrypt_passwords: password = self._encryptPassword(password) self.data[name]=User(name,password,roles,domains) | 94ef40ee4b2a816ea39b4da68d7bb7d1ef1e83e5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/94ef40ee4b2a816ea39b4da68d7bb7d1ef1e83e5/User.py |
try: if hasattr(object,'__bobo_traverse__'): | if hasattr(object,'__bobo_traverse__'): try: | def publishTraverse(self, request, name): object = self.context URL=request['URL'] | f3734c4f7951b5508cd803627891478738f04cd5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/f3734c4f7951b5508cd803627891478738f04cd5/BaseRequest.py |
parents[-1:] = list(subobject[:-1]) object, subobject = subobject[-2:] | request['PARENTS'][-1:] = list(subobject[:-1]) object, subobject = subobject[-2:] except (AttributeError, KeyError, NotFound), e: subobject = queryMultiAdapter((object, request), Interface, name) if subobject is not None: request.response.setStatus(200) return subobject.__of__(object) raise e else: if hasattr... | def publishTraverse(self, request, name): object = self.context URL=request['URL'] | f3734c4f7951b5508cd803627891478738f04cd5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/f3734c4f7951b5508cd803627891478738f04cd5/BaseRequest.py |
if hasattr(aq_base(object), name): subobject = getattr(object, name) else: subobject=object[name] except (AttributeError, KeyError, NotFound), e: subobject = queryMultiAdapter((object, request), Interface, name) if subobject is not None: request.response.setStatus(200) return subobject.__of__(object) | subobject = queryMultiAdapter((object, request), Interface, name) if subobject is not None: return subobject.__of__(object) | def publishTraverse(self, request, name): object = self.context URL=request['URL'] | f3734c4f7951b5508cd803627891478738f04cd5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/f3734c4f7951b5508cd803627891478738f04cd5/BaseRequest.py |
if not hasattr(object,'__bobo_traverse__'): | def publishTraverse(self, request, name): object = self.context URL=request['URL'] | f3734c4f7951b5508cd803627891478738f04cd5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/f3734c4f7951b5508cd803627891478738f04cd5/BaseRequest.py | |
raise e | subobject = object[name] | def publishTraverse(self, request, name): object = self.context URL=request['URL'] | f3734c4f7951b5508cd803627891478738f04cd5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/f3734c4f7951b5508cd803627891478738f04cd5/BaseRequest.py |
return whrandom.choice(salt_choices) | return whrandom.choice(salt_choices)+whrandom.choice(salt_choices) | def generate_salt(): """Generate a salt value for the crypt function.""" salt_choices = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" \ "abcdefghijklmnopqrstuvwxyz" \ "0123456789./" return whrandom.choice(salt_choices) | 40430ab5f60addf5f55a58de0450eaabcfa0a613 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/40430ab5f60addf5f55a58de0450eaabcfa0a613/zpasswd.py |
""" need to be consistent with the interface """ | """ needed to be consistent with the interface """ | def uniqueValues(self,name=None,withLength=0): """ need to be consistent with the interface """ | 783d0f95f3e77efab631b6fc2335b1f393716e28 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/783d0f95f3e77efab631b6fc2335b1f393716e28/PathIndex.py |
def uniqueValues(self,name=None,withLength=0): """ need to be consistent with the interface """ | 783d0f95f3e77efab631b6fc2335b1f393716e28 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/783d0f95f3e77efab631b6fc2335b1f393716e28/PathIndex.py | ||
def availableSplitter(self): | def availableSplitters(self): | def availableSplitter(self): """ splitter we can add """ return Splitter.availableSplitters | fa6133bc34f4051342345000f969926e3ef7baf7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/fa6133bc34f4051342345000f969926e3ef7baf7/ZCatalog.py |
result=self(REQUEST) | try: result=self(REQUEST) result=custom_default_report(self.id, result) except: result=( '<hr><strong>Error, <em>%s</em>:</strong> %s' % (sys.exc_type, sys.exc_value)) | def manage_test(self, REQUEST): | ad3bca87d90e9aa77e7261ddf70ab15ece9c8509 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/ad3bca87d90e9aa77e7261ddf70ab15ece9c8509/DA.py |
% custom_default_report(self.id, result)) | % result) | def manage_test(self, REQUEST): | ad3bca87d90e9aa77e7261ddf70ab15ece9c8509 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/ad3bca87d90e9aa77e7261ddf70ab15ece9c8509/DA.py |
self._run_check("""<a a.b='v' c:d='v' e-f='v'/>""", [ ("starttag", "a", ["a.b", "v", "c:d", "v", "e-f", "v"]), | self._run_check("""<a a.b='v' e-f='v'/>""", [ ("starttag", "a", ["a.b", "v", "e-f", "v"]), | def check_attr_funky_names(self): self._run_check("""<a a.b='v' c:d='v' e-f='v'/>""", [ ("starttag", "a", ["a.b", "v", "c:d", "v", "e-f", "v"]), ("endtag", "a"), ]) | 8a23bcd019b861672cdb793a324da1154f3aaf66 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/8a23bcd019b861672cdb793a324da1154f3aaf66/test_xmlparser.py |
if v!=key: raise AttributeError, v | if str(v) != key: raise AttributeError, v | def __bobo_traverse__(self, REQUEST, key): name=self._name da=self.__dict__['_da'] args=self._args if name: if args.has_key(name): v=args[name] if type(v) is not ListType: v=[v] v.append(key) key=v | d35d2753d5d5ebbe85f6f05179f3b3c071e1c0a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/d35d2753d5d5ebbe85f6f05179f3b3c071e1c0a7/DA.py |
def __getitem__(self,index): | 22ca43a2d5ac84f3f411741d7b6cc318a7e2004b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/22ca43a2d5ac84f3f411741d7b6cc318a7e2004b/Zope.py | ||
except 'Unauthorized', vv: | except Unauthorized, vv: | def __getitem__(self,index): | 22ca43a2d5ac84f3f411741d7b6cc318a7e2004b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/22ca43a2d5ac84f3f411741d7b6cc318a7e2004b/Zope.py |
self.title = str(item.children[0]) | self.title = item.children[0].astext() | def render(self): ''' Render the source to HTML ''' # format with strings pub = docutils.core.Publisher() pub.set_reader('standalone', None, 'restructuredtext') pub.set_writer('html') | ab0b7c1d16781cf360dfb3cb1fe4f437397225b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/ab0b7c1d16781cf360dfb3cb1fe4f437397225b0/ZReST.py |
lg = logger.syslog_logger(string.split(os.environ['ZSYSLOG_SERVER'], ':')) | (addr, port) = string.split(os.environ['ZSYSLOG_SERVER'], ':') lg = logger.syslog_logger((addr, int(port)) | def set_locale(val): try: import locale except: raise SystemExit, ( 'The locale module could not be imported.\n' 'To use localization options, you must ensure\n' 'that the locale module is compiled into your\n' 'Python installation.' ) try: locale.setlocale(locale.LC_ALL, val) except: raise SystemExit, ( 'The specified... | 6da1e1f2262ca680c0d548ef28d70b13d643d3b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/6da1e1f2262ca680c0d548ef28d70b13d643d3b9/z2.py |
return '<a href="http://www.zope.org/Credits"><img ' \ | return '<a href="http://www.zope.org/Credits" target="_top"><img ' \ | def ZopeAttributionButton(self): """Returns an HTML fragment that displays the 'powered by zope' button along with a link to the Zope site.""" return '<a href="http://www.zope.org/Credits"><img ' \ 'src="%s/p_/ZopeButton" width="115" height="50" ' \ 'border="0" alt="Powered by Zope"></a>' % self.REQUEST.BASE1 | 6a75bd86f04a234ee4b32a17fd61f0988fe3d8a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/6a75bd86f04a234ee4b32a17fd61f0988fe3d8a8/Application.py |
if path: path=[script]+path else: path=[script] | if script: path=[script]+path if not path: return '' | def tabs_path_info(self, script, path): url=script out=[] while path[:1]=='/': path=path[1:] while path[-1:]=='/': path=path[:-1] while script[:1]=='/': script=script[1:] while script[-1:]=='/': script=script[:-1] path=split(path,'/')[:-1] if path: path=[script]+path else: path=[script] script='' last=path[-1] del path... | ba18308550ff19bbd37afeaa6d7c644b398ff881 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/ba18308550ff19bbd37afeaa6d7c644b398ff881/Management.py |
return parse(text[l:],prefix,result) | return parse(text[l:],result) | def parse(text, result=None, unparmre=regex.compile( '\([\0- ]*\([^\0- =\"]+\)\)'), parmre=regex.compile( '\([\0- ]*\([^\0- =\"]+\)=\([^\0- =\"]+\)\)'), qparmre=regex.compile( '\([\0- ]*\([^\0- =\"]+\)="\([^"]+\)\"\)'), ): if result is None: result = {} __traceback_info__=text if parmre.match(text) >= 0: name=parmre... | bccfdb17be3f5559933a70ca78efbccc71ae1b48 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/bccfdb17be3f5559933a70ca78efbccc71ae1b48/Aqueduct.py |
if hasattr(self.aq_base,'manage_FTPget'): | if hasattr(self.aq_base,'manage_FTPget') and \ hasattr(self.manage_FTPget, '__roles__'): | def manage_FTPstat(self,REQUEST): "psuedo stat, used by FTP for directory listings" from AccessControl.User import nobody mode=0100000 # check read permissions if hasattr(self.aq_base,'manage_FTPget'): if REQUEST['AUTHENTICATED_USER'].allowed(self.manage_FTPget, self.manage_FTPget.__roles__): mode=mode | 0440 if nobody... | d6407826189bc19856c4e91520f58e265eda47d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/d6407826189bc19856c4e91520f58e265eda47d4/SimpleItem.py |
if hasattr(self.aq_base,'PUT'): | if hasattr(self.aq_base,'PUT') and hasattr(self.PUT, '__roles__'): | def manage_FTPstat(self,REQUEST): "psuedo stat, used by FTP for directory listings" from AccessControl.User import nobody mode=0100000 # check read permissions if hasattr(self.aq_base,'manage_FTPget'): if REQUEST['AUTHENTICATED_USER'].allowed(self.manage_FTPget, self.manage_FTPget.__roles__): mode=mode | 0440 if nobody... | d6407826189bc19856c4e91520f58e265eda47d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/d6407826189bc19856c4e91520f58e265eda47d4/SimpleItem.py |
""" underscores in literals shouldn't do unterlining """ | """ underscores in literals shouldn't do underlining """ | def testUnderscoresInLiteral1(self): """ underscores in literals shouldn't do unterlining """ | 3f6e2ae459b5a30ba3ce41daba7d96cdd1fe0431 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/3f6e2ae459b5a30ba3ce41daba7d96cdd1fe0431/testStructuredText.py |
""" underscores in literals shouldn't do unterlining """ | """ underscores in literals shouldn't do underlining """ | def testUnderscoresInLiteral2(self): """ underscores in literals shouldn't do unterlining """ | 3f6e2ae459b5a30ba3ce41daba7d96cdd1fe0431 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/3f6e2ae459b5a30ba3ce41daba7d96cdd1fe0431/testStructuredText.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.