bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def __init__(self,
def __init__(self,
3,900
def __init__(self,
def __init__(self,
3,901
def __init__(self,
def __init__(self,
3,902
def __init__(self,
def __init__(self,
3,903
def get_module_info(self, server_name, module_name, module):
def get_module_info(self, server_name, module_name, module):
3,904
def get_module_info(self, server_name, module_name, module):
def get_module_info(self, server_name, module_name, module):
3,905
def get_module_info(self, server_name, module_name, module):
def get_module_info(self, server_name, module_name, module):
3,906
def get_module_info(self, server_name, module_name, module):
def get_module_info(self, server_name, module_name, module):
3,907
def get_module_info(self, server_name, module_name, module):
def get_module_info(self, server_name, module_name, module):
3,908
def get_module_info(self, server_name, module_name, module):
def get_module_info(self, server_name, module_name, module):
3,909
def get_module_info(self, server_name, module_name, module):
def get_module_info(self, server_name, module_name, module):
3,910
def get_module_info(self, server_name, module_name, module):
def get_module_info(self, server_name, module_name, module):
3,911
def publish(self, module_name, after_list, published='web_objects',
def publish(self, module_name, after_list, published='web_objects',
3,912
def publish(self, module_name, after_list, published='web_objects',
def publish(self, module_name, after_list, published='web_objects',
3,913
def publish(self, module_name, after_list, published='web_objects',
def publish(self, module_name, after_list, published='web_objects',
3,914
def publish(self, module_name, after_list, published='web_objects',
def publish(self, module_name, after_list, published='web_objects',
3,915
def publish(self, module_name, after_list, published='web_objects',
def publish(self, module_name, after_list, published='web_objects',
3,916
def publish(self, module_name, after_list, published='web_objects',
def publish(self, module_name, after_list, published='web_objects',
3,917
def publish(self, module_name, after_list, published='web_objects',
def publish(self, module_name, after_list, published='web_objects',
3,918
def publish(self, module_name, after_list, published='web_objects',
def publish(self, module_name, after_list, published='web_objects',
3,919
def publish(self, module_name, after_list, published='web_objects',
def publish(self, module_name, after_list, published='web_objects',
3,920
def publish(self, module_name, after_list, published='web_objects',
def publish(self, module_name, after_list, published='web_objects',
3,921
def publish(self, module_name, after_list, published='web_objects',
def publish(self, module_name, after_list, published='web_objects',
3,922
def publish(self, module_name, after_list, published='web_objects',
def publish(self, module_name, after_list, published='web_objects',
3,923
def publish(self, module_name, after_list, published='web_objects',
def publish(self, module_name, after_list, published='web_objects',
3,924
def publish(self, module_name, after_list, published='web_objects',
def publish(self, module_name, after_list, published='web_objects',
3,925
def publish(self, module_name, after_list, published='web_objects',
def publish(self, module_name, after_list, published='web_objects',
3,926
def publish(self, module_name, after_list, published='web_objects',
def publish(self, module_name, after_list, published='web_objects',
3,927
def publish(self, module_name, after_list, published='web_objects',
def publish(self, module_name, after_list, published='web_objects',
3,928
def publish(self, module_name, after_list, published='web_objects',
def publish(self, module_name, after_list, published='web_objects',
3,929
def function_with_empty_signature(): pass
def function_with_empty_signature(): pass
3,930
def function_with_empty_signature(): pass
def function_with_empty_signature(): pass
3,931
def function_with_empty_signature(): pass
def function_with_empty_signature(): pass
3,932
def function_with_empty_signature(): pass
def function_with_empty_signature(): pass
3,933
def function_with_empty_signature(): pass
def function_with_empty_signature(): pass
3,934
def function_with_empty_signature(): pass
def function_with_empty_signature(): pass
3,935
def function_with_empty_signature(): pass
def function_with_empty_signature(): pass
3,936
def str_field(v): if type(v) is types.ListType: return map(str_field,v) if type(v) is types.InstanceType and v.__class__ is FieldStorage: v=v.value elif type(v) is not types.StringType: try: if v.file: v=v.file else: v=v.value except: pass return v
def str_field(v): if type(v) is ListType: return map(str_field,v) if type(v) is types.InstanceType and v.__class__ is FieldStorage: v=v.value elif type(v) is not types.StringType: try: if v.file: v=v.file else: v=v.value except: pass return v
3,937
def str_field(v): if type(v) is types.ListType: return map(str_field,v) if type(v) is types.InstanceType and v.__class__ is FieldStorage: v=v.value elif type(v) is not types.StringType: try: if v.file: v=v.file else: v=v.value except: pass return v
def str_field(v): if type(v) is types.ListType: return map(str_field,v) if hasattr(v,'__class__') and v.__class__ is FieldStorage: v=v.value elif type(v) is not types.StringType: try: if v.file: v=v.file else: v=v.value except: pass return v
3,938
def str_field(v): if type(v) is types.ListType: return map(str_field,v) if type(v) is types.InstanceType and v.__class__ is FieldStorage: v=v.value elif type(v) is not types.StringType: try: if v.file: v=v.file else: v=v.value except: pass return v
def str_field(v): if type(v) is types.ListType: return map(str_field,v) if type(v) is types.InstanceType and v.__class__ is FieldStorage: v=v.value elif type(v) is not StringType: if hasattr(v,'file') and v.file: v=v.file elif hasattr(v,'value'): v=v.value return v
3,939
def __init__(self, aFieldStorage):
def __init__(self, aFieldStorage):
3,940
def __init__(self, aFieldStorage):
def __init__(self, aFieldStorage):
3,941
def field2string(v): try: v=v.read() except: v=str(v) return v
def field2string(v): if hasattr(v,'read'): v=v.read() else: v=str(v) return v
3,942
def field2text(v, nl=regex.compile('\r\n\|\n\r'), sub=regsub.gsub): try: v=v.read() except: v=str(v) v=sub(nl,'\n',v) return v
def field2text(v, nl=regex.compile('\r\n\|\n\r'), sub=regsub.gsub): if hasattr(v,'read'): v=v.read() else: v=str(v) v=sub(nl,'\n',v) return v
3,943
def field2required(v): try: v=v.read() except: v=str(v) if strip(v): return v raise ValueError, 'No input for required field<p>'
def field2required(v): if hasattr(v,'read'): v=v.read() else: v=str(v) if strip(v): return v raise ValueError, 'No input for required field<p>'
3,944
def field2int(v): try: v=v.read() except: v=str(v) # we can remove the check for an empty string when we go to python 1.4 if v: return atoi(v) raise ValueError, 'Empty entry when <strong>integer</strong> expected'
def field2int(v): if hasattr(v,'read'): v=v.read() else: v=str(v) # we can remove the check for an empty string when we go to python 1.4 if v: return atoi(v) raise ValueError, 'Empty entry when <strong>integer</strong> expected'
3,945
def field2float(v): try: v=v.read() except: v=str(v) # we can remove the check for an empty string when we go to python 1.4 if v: return atof(v) raise ValueError, ( 'Empty entry when <strong>floating-point number</strong> expected')
def field2float(v): if hasattr(v,'read'): v=v.read() else: v=str(v) # we can remove the check for an empty string when we go to python 1.4 if v: return atof(v) raise ValueError, ( 'Empty entry when <strong>floating-point number</strong> expected')
3,946
def field2long(v): try: v=v.read() except: v=str(v) # we can remove the check for an empty string when we go to python 1.4 if v: return atol(v) raise ValueError, 'Empty entry when <strong>integer</strong> expected'
def field2long(v): if hasattr(v,'read'): v=v.read() else: v=str(v) # we can remove the check for an empty string when we go to python 1.4 if v: return atol(v) raise ValueError, 'Empty entry when <strong>integer</strong> expected'
3,947
def field2Regex(v): try: v=v.read() except: v=str(v) if v: return regex.compile(v)
def field2Regex(v): if hasattr(v,'read'): v=v.read() else: v=str(v) if v: return regex.compile(v)
3,948
def field2regex(v): try: v=v.read() except: v=str(v) if v: return regex.compile(v,regex.casefold)
def field2regex(v): if hasattr(v,'read'): v=v.read() else: v=str(v) if v: return regex.compile(v,regex.casefold)
3,949
def field2Regexs(v): try: v=v.read() except: v=str(v) v= map(lambda v: regex.compile(v), split(v)) if v: return v
def field2Regexs(v): if hasattr(v,'read'): v=v.read() else: v=str(v) v= map(lambda v: regex.compile(v), split(v)) if v: return v
3,950
def field2regexs(v): try: v=v.read() except: v=str(v) v= map(lambda v: regex.compile(v, regex.casefold), split(v)) if v: return v
def field2regexs(v): if hasattr(v,'read'): v=v.read() else: v=str(v) v= map(lambda v: regex.compile(v, regex.casefold), split(v)) if v: return v
3,951
def field2tokens(v): try: v=v.read() except: v=str(v) return split(v)
def field2tokens(v): if hasattr(v,'read'): v=v.read() else: v=str(v) return split(v)
3,952
def field2lines(v, crlf=regex.compile('\r\n\|\n\r')): try: v=v.read() except: v=str(v) v=regsub.gsub(crlf,'\n',v) return split(v,'\n')
def field2lines(v, crlf=regex.compile('\r\n\|\n\r')): if hasattr(v,'read'): v=v.read() else: v=str(v) v=regsub.gsub(crlf,'\n',v) return split(v,'\n')
3,953
def field2date(v): from DateTime import DateTime try: v=v.read() except: v=str(v) return DateTime(v)
def field2date(v): from DateTime import DateTime if hasattr(v,'read'): v=v.read() else: v=str(v) return DateTime(v)
3,954
def field2list(v): if type(v) is not types.ListType: v=[v] return v
def field2list(v): if type(v) is not ListType: v=[v] return v
3,955
def field2tuple(v): if type(v) is not types.ListType: v=(v,) return tuple(v)
def field2tuple(v): if type(v) is not ListType: v=(v,) return tuple(v)
3,956
def field2tuple(v): if type(v) is not types.ListType: v=(v,) return tuple(v)
def field2tuple(v): if type(v) is not types.ListType: v=(v,) return tuple(v)
3,957
def field2tuple(v): if type(v) is not types.ListType: v=(v,) return tuple(v)
def field2tuple(v): if type(v) is not types.ListType: v=(v,) return tuple(v)
3,958
def field2tuple(v): if type(v) is not types.ListType: v=(v,) return tuple(v)
def field2tuple(v): if type(v) is not types.ListType: v=(v,) return tuple(v)
3,959
def __init__(self,environ,form,stdin):
def __init__(self,environ,form,stdin):
3,960
def __init__(self,environ,form,stdin):
def __init__(self,environ,form,stdin):
3,961
def has_key(self,key):
def has_key(self,key):
3,962
def __getitem__(self,key, URLmatch=regex.compile('URL[0-9]$').match, BASEmatch=regex.compile('BASE[0-9]$').match, ):
def __getitem__(self,key, URLmatch=regex.compile('URL[0-9]$').match, BASEmatch=regex.compile('BASE[0-9]$').match, ):
3,963
def __getitem__(self,key, URLmatch=regex.compile('URL[0-9]$').match, BASEmatch=regex.compile('BASE[0-9]$').match, ):
def __getitem__(self,key, URLmatch=regex.compile('URL[0-9]$').match, BASEmatch=regex.compile('BASE[0-9]$').match, ):
3,964
def __getitem__(self,key, URLmatch=regex.compile('URL[0-9]$').match, BASEmatch=regex.compile('BASE[0-9]$').match, ):
def __getitem__(self,key, URLmatch=regex.compile('URL[0-9]$').match, BASEmatch=regex.compile('BASE[0-9]$').match, ):
3,965
def __getitem__(self,key, URLmatch=regex.compile('URL[0-9]$').match, BASEmatch=regex.compile('BASE[0-9]$').match, ):
def __getitem__(self,key, URLmatch=regex.compile('URL[0-9]$').match, BASEmatch=regex.compile('BASE[0-9]$').match, ):
3,966
def publish_module(module_name, stdin=sys.stdin, stdout=sys.stdout, stderr=sys.stderr, environ=os.environ, debug=0): must_die=0 status=200 after_list=[None] try: response=Response(stdout=stdout, stderr=stderr) publisher = ModulePublisher(stdin=stdin, stdout=stdout, stderr=stderr, environ=environ) response = publisher.r...
def publish_module(module_name, stdin=sys.stdin, stdout=sys.stdout, stderr=sys.stderr, environ=os.environ, debug=0): must_die=0 status=200 after_list=[None] try: response=Response(stdout=stdout, stderr=stderr) publisher = ModulePublisher(stdin=stdin, stdout=stdout, stderr=stderr, environ=environ) response = publisher.r...
3,967
def publish_module(module_name, stdin=sys.stdin, stdout=sys.stdout, stderr=sys.stderr, environ=os.environ, debug=0): must_die=0 status=200 after_list=[None] try: response=Response(stdout=stdout, stderr=stderr) publisher = ModulePublisher(stdin=stdin, stdout=stdout, stderr=stderr, environ=environ) response = publisher.r...
def publish_module(module_name, stdin=sys.stdin, stdout=sys.stdout, stderr=sys.stderr, environ=os.environ, debug=0): must_die=0 status=200 after_list=[None] try: response=Response(stdout=stdout, stderr=stderr) publisher = ModulePublisher(stdin=stdin, stdout=stdout, stderr=stderr, environ=environ) response = publisher.r...
3,968
def realize(self, *args, **kw): ZDOptions.realize(self, *args, **kw) config = self.configroot self.directory = config.instancehome self.program = [os.path.join(self.directory, "bin", "runzope")] self.sockname = os.path.join(config.clienthome, "zopectlsock") self.user = None self.python = sys.executable self.zdrun = os....
def realize(self, *args, **kw): ZDOptions.realize(self, *args, **kw) config = self.configroot self.directory = config.instancehome self.program = [os.path.join(self.directory, "bin", "runzope")] self.sockname = os.path.join(self.clienthome, "zopectlsock") self.user = None self.python = sys.executable self.zdrun = os.pa...
3,969
def __init__(self,*args): """Return a new date-time object
def __init__(self,*args): """Return a new date-time object
3,970
def _parse(self,string): # Parse date-time components from a string month=year=tz=tm=None spaces =self.space_chars intpat =self.int_pattern fltpat =self.flt_pattern wordpat =self.name_pattern delimiters =self.delimiters MonthNumbers =self._monthmap DayOfWeekNames=self._daymap ValidZones ...
def _parse(self,string): # Parse date-time components from a string month=year=tz=tm=None spaces =self.space_chars intpat =self.int_pattern fltpat =self.flt_pattern wordpat =self.name_pattern delimiters =self.delimiters MonthNumbers =self._monthmap DayOfWeekNames=self._daymap ValidZones ...
3,971
def _parse(self,string): # Parse date-time components from a string month=year=tz=tm=None spaces =self.space_chars intpat =self.int_pattern fltpat =self.flt_pattern wordpat =self.name_pattern delimiters =self.delimiters MonthNumbers =self._monthmap DayOfWeekNames=self._daymap ValidZones ...
def _parse(self,string): # Parse date-time components from a string month=year=tz=tm=None spaces =self.space_chars intpat =self.int_pattern fltpat =self.flt_pattern wordpat =self.name_pattern delimiters =self.delimiters MonthNumbers =self._monthmap DayOfWeekNames=self._daymap ValidZones ...
3,972
def _verifyObjectPaste(self, object, validate_src=1): # Verify whether the current user is allowed to paste the # passed object into self. This is determined by checking # to see if the user could create a new object of the same # meta_type of the object passed in and checking that the # user actually is allowed to acc...
def _verifyObjectPaste(self, object, validate_src=1): # Verify whether the current user is allowed to paste the # passed object into self. This is determined by checking # to see if the user could create a new object of the same # meta_type of the object passed in and checking that the # user actually is allowed to acc...
3,973
def _verifyObjectPaste(self, object, validate_src=1): # Verify whether the current user is allowed to paste the # passed object into self. This is determined by checking # to see if the user could create a new object of the same # meta_type of the object passed in and checking that the # user actually is allowed to acc...
def _verifyObjectPaste(self, object, validate_src=1): # Verify whether the current user is allowed to paste the # passed object into self. This is determined by checking # to see if the user could create a new object of the same # meta_type of the object passed in and checking that the # user actually is allowed to acc...
3,974
def _verifyObjectPaste(self, object, validate_src=1): # Verify whether the current user is allowed to paste the # passed object into self. This is determined by checking # to see if the user could create a new object of the same # meta_type of the object passed in and checking that the # user actually is allowed to acc...
def _verifyObjectPaste(self, object, validate_src=1): # Verify whether the current user is allowed to paste the # passed object into self. This is determined by checking # to see if the user could create a new object of the same # meta_type of the object passed in and checking that the # user actually is allowed to acc...
3,975
def cookie_path(request): # Return a "path" value for use in a cookie that refers # to the root of the Zope object space. return request['BASEPATH1'] or "/"
def cookie_path(request): # Return a "path" value for use in a cookie that refers # to the root of the Zope object space. return request['BASEPATH1'] or "/"
3,976
def field2date(v): from DateTime import DateTime if hasattr(v,'read'): v=v.read() else: v=str(v) return DateTime(v)
def field2date(v): from DateTime import DateTime if hasattr(v,'read'): v=v.read() else: v=str(v) return DateTime(v)
3,977
def field2boolean(v): return v
def field2boolean(v): return v
3,978
def field2tuple(v): if type(v) is not ListType: v=(v,) return tuple(v)
def field2tuple(v): if type(v) is not TupleType: v=(v,) return tuple(v)
3,979
def MOVE(self, REQUEST, RESPONSE): """Move a resource to a new location. Though we may later try to make a move appear seamless across namespaces (e.g. from Zope to Apache), MOVE is currently only supported within the Zope namespace.""" self.dav__init(REQUEST, RESPONSE) self.dav__validate(self, 'DELETE', REQUEST) if no...
def MOVE(self, REQUEST, RESPONSE): """Move a resource to a new location. Though we may later try to make a move appear seamless across namespaces (e.g. from Zope to Apache), MOVE is currently only supported within the Zope namespace.""" self.dav__init(REQUEST, RESPONSE) self.dav__validate(self, 'DELETE', REQUEST) if no...
3,980
def PUT(self, REQUEST, RESPONSE): """Create a new non-collection resource.""" self.dav__init(REQUEST, RESPONSE) type=REQUEST.get_header('content-type', None) body=REQUEST.get('BODY', '') name=self.__name__ if type is None: type, enc=mimetypes.guess_type(name) if type is None: if OFS.content_types.find_binary(body) >= 0...
def PUT(self, REQUEST, RESPONSE): """Create a new non-collection resource.""" self.dav__init(REQUEST, RESPONSE) type=REQUEST.get_header('content-type', None) body=REQUEST.get('BODY', '') name=self.__name__ if type is None: type, enc=mimetypes.guess_type(name) if type is None: if OFS.content_types.find_binary(body) >= 0...
3,981
def __call__(self): self.namespaceDict = {} self.namespaceStack = [self.namespaceDict] DOMVisitor.__call__(self) assert not self.stack return self.program, self.macros
def __call__(self): self.namespaceDict = {"xml": XML_NS} self.namespaceStack = [self.namespaceDict] DOMVisitor.__call__(self) assert not self.stack return self.program, self.macros
3,982
def optimize(self, program): output = [] collect = [] rawseen = cursor = 0 if self.xml: endsep = "/>" else: endsep = " />" for cursor in xrange(len(program)+1): try: item = program[cursor] except IndexError: item = (None, None) if item[0] == "rawtext": collect.append(item[1]) continue if item[0] == "endTag": collect.ap...
def optimize(self, program): output = [] collect = [] rawseen = cursor = 0 if self.xml: endsep = "/>" else: endsep = " />" for cursor in xrange(len(program)+1): try: item = program[cursor] except IndexError: item = (None, None) opcode = item[0] if opcode == "rawtext": collect.append(item[1]) continue if item[0] == "end...
3,983
def optimize(self, program): output = [] collect = [] rawseen = cursor = 0 if self.xml: endsep = "/>" else: endsep = " />" for cursor in xrange(len(program)+1): try: item = program[cursor] except IndexError: item = (None, None) if item[0] == "rawtext": collect.append(item[1]) continue if item[0] == "endTag": collect.ap...
def optimize(self, program): output = [] collect = [] rawseen = cursor = 0 if self.xml: endsep = "/>" else: endsep = " />" for cursor in xrange(len(program)+1): try: item = program[cursor] except IndexError: item = (None, None) if item[0] == "rawtext": collect.append(item[1]) continue if opcode == "endTag": collect.app...
3,984
def optimize(self, program): output = [] collect = [] rawseen = cursor = 0 if self.xml: endsep = "/>" else: endsep = " />" for cursor in xrange(len(program)+1): try: item = program[cursor] except IndexError: item = (None, None) if item[0] == "rawtext": collect.append(item[1]) continue if item[0] == "endTag": collect.ap...
def optimize(self, program): output = [] collect = [] rawseen = cursor = 0 if self.xml: endsep = "/>" else: endsep = " />" for cursor in xrange(len(program)+1): try: item = program[cursor] except IndexError: item = (None, None) if item[0] == "rawtext": collect.append(item[1]) continue if item[0] == "endTag": collect.ap...
3,985
def optimize(self, program): output = [] collect = [] rawseen = cursor = 0 if self.xml: endsep = "/>" else: endsep = " />" for cursor in xrange(len(program)+1): try: item = program[cursor] except IndexError: item = (None, None) if item[0] == "rawtext": collect.append(item[1]) continue if item[0] == "endTag": collect.ap...
def optimize(self, program): output = [] collect = [] rawseen = cursor = 0 if self.xml: endsep = "/>" else: endsep = " />" for cursor in xrange(len(program)+1): try: item = program[cursor] except IndexError: item = (None, None) if item[0] == "rawtext": collect.append(item[1]) continue if item[0] == "endTag": collect.ap...
3,986
def optimize(self, program): output = [] collect = [] rawseen = cursor = 0 if self.xml: endsep = "/>" else: endsep = " />" for cursor in xrange(len(program)+1): try: item = program[cursor] except IndexError: item = (None, None) if item[0] == "rawtext": collect.append(item[1]) continue if item[0] == "endTag": collect.ap...
def optimize(self, program): output = [] collect = [] rawseen = cursor = 0 if self.xml: endsep = "/>" else: endsep = " />" for cursor in xrange(len(program)+1): try: item = program[cursor] except IndexError: item = (None, None) if item[0] == "rawtext": collect.append(item[1]) continue if item[0] == "endTag": collect.ap...
3,987
def validate(self, accessed, container, name, value, context, None=None, type=type, IntType=type(0), DictType=type({}), getattr=getattr, _noroles=_noroles, StringType=type(''), Containers=SimpleObjectPolicies.Containers, valid_aq_=('aq_parent','aq_explicit')):
def validate(self, accessed, container, name, value, context, None=None, type=type, IntType=type(0), DictType=type({}), getattr=getattr, _noroles=_noroles, StringType=type(''), Containers=SimpleObjectPolicies.Containers, valid_aq_=('aq_parent','aq_explicit')):
3,988
def validate(self, accessed, container, name, value, context, None=None, type=type, IntType=type(0), DictType=type({}), getattr=getattr, _noroles=_noroles, StringType=type(''), Containers=SimpleObjectPolicies.Containers, valid_aq_=('aq_parent','aq_explicit')):
def validate(self, accessed, container, name, value, context, None=None, type=type, IntType=type(0), DictType=type({}), getattr=getattr, _noroles=_noroles, StringType=type(''), Containers=SimpleObjectPolicies.Containers, valid_aq_=('aq_parent','aq_explicit')):
3,989
def structure(list): if not list: return [] i=0 l=len(list) r=[] while i < l: sublen=paragraphs(list,i) i=i+1 r.append((list[i-1][1],structure(list[i:i+sublen]))) i=i+sublen return r
def structure(list): if not list: return [] i=0 l=len(list) r=[] while i < l: sublen=paragraphs(list,i) i=i+1 r.append((list[i-1][1],structure(list[i:i+sublen]))) i=i+sublen return r
3,990
def __init__(self,aStructuredString, level=1):
def __init__(self,aStructuredString, level=1):
3,991
def ctag(s): if s is None: s='' s=regsub.gsub(extra_dl,'\n',s) s=regsub.gsub(extra_ul,'\n',s) s=regsub.gsub(extra_ol,'\n',s) s=regsub.gsub(strong,' <strong>\\1</strong>\\2',s) s=regsub.gsub(code,' <code>\\1</code>\\3',s) s=regsub.gsub(em,' <em>\\1</em>\\2',s) return s
def ctag(s): if s is None: s='' s=regsub.gsub(strong,' <strong>\\1</strong>\\2',s) s=regsub.gsub(code,' <code>\\1</code>\\3',s) s=regsub.gsub(em,' <em>\\1</em>\\2',s) return s
3,992
def __str__(self):
def __str__(self):
3,993
def head(self, before, t, level, d):
defif level > 0 and level < 6: return ('%s<h%d>%s</h%d>\n%s\n' % (before,level,ctag(t),level,d)) head(self,if level > 0 and level < 6: return ('%s<h%d>%s</h%d>\n%s\n' % (before,level,ctag(t),level,d)) before,if level > 0 and level < 6: return ('%s<h%d>%s</h%d>\n%s\n' % (before,level,ctag(t),level,d)) t,if level > 0 ...
3,994
def _str(self,structure,level):
def _str(self,structure,level):
3,995
def _str(self,structure,level):
def _str(self,structure,level):
3,996
def html_with_references(text): import regsub text = regsub.gsub( '[\0\n].. \[\([0-9_a-zA-Z]+\)\]', '\n <a name="\\1">[\\1]</a>', text) text = regsub.gsub( '\([\0- ,]\)\[\([0-9_a-zA-Z]+\)\]\([\0- ,.:]\)', '\\1<a href="#\\2">[\\2]</a>\\3', text) text = regsub.gsub( '\([\0- ]\)\([a-z]+://[^\0- ]+\)', '\\1<a href="\\2"...
def html_with_references(text): import regsub text = regsub.gsub( '[\0\n].. \[\([-_0-9_a-zA-Z]+\)\]', '\n <a name="\\1">[\\1]</a>', text) text = regsub.gsub( '\([\0- ,]\)\[\([0-9_a-zA-Z]+\)\]\([\0- ,.:]\)', '\\1<a href="#\\2">[\\2]</a>\\3', text) text = regsub.gsub( '\([\0- ]\)\([a-z]+://[^\0- ]+\)', '\\1<a href="\\...
3,997
def html_with_references(text): import regsub text = regsub.gsub( '[\0\n].. \[\([0-9_a-zA-Z]+\)\]', '\n <a name="\\1">[\\1]</a>', text) text = regsub.gsub( '\([\0- ,]\)\[\([0-9_a-zA-Z]+\)\]\([\0- ,.:]\)', '\\1<a href="#\\2">[\\2]</a>\\3', text) text = regsub.gsub( '\([\0- ]\)\([a-z]+://[^\0- ]+\)', '\\1<a href="\\2"...
def html_with_references(text): import regsub text = regsub.gsub( '[\0\n].. \[\([0-9_a-zA-Z]+\)\]', '\n <a name="\\1">[\\1]</a>', text) text = regsub.gsub( '\([\0- ,]\)\[\([0-9_a-zA-Z]+\)\]\([\0- ,.:]\)', '\\1<a href="#\\2">[\\2]</a>\\3', text) text = regsub.gsub( '\([\0- ]\)\([a-z]+://[^\0- ]+\)', '\\1<a href="\\2"...
3,998
def goahead(self, end): rawdata = self.rawdata i = 0 n = len(rawdata) while i < n: if self.nomoretags: self.handle_data(rawdata[i:n]) i = self.updatepos(i, n) break match = interesting.search(rawdata, i) if match: j = match.start(0) else: j = n if i < j: self.handle_data(rawdata[i:j]) i = self.updatepos(i, j) if i == n...
def goahead(self, end): rawdata = self.rawdata i = 0 n = len(rawdata) while i < n: if self.nomoretags: self.handle_data(rawdata[i:n]) i = self.updatepos(i, n) break match = interesting.search(rawdata, i) if match: j = match.start(0) else: j = n if i < j: self.handle_data(rawdata[i:j]) i = self.updatepos(i, j) if i == n...
3,999