Did I find the right examples for you? yes no

All Samples(36)  |  Call(24)  |  Derive(0)  |  Import(12)

        def unquote(line):
    line = re.sub('%20', ' ', line)
    return re.sub('%22', '"', line)
        


src/d/e/deepin-music-player-HEAD/src/song.py   deepin-music-player(Download)
            elif self.get_type() == "cdda":
                uri = self.get("uri")
                return utils.unquote(uri[uri.find("#") + 1:])
            else:
                return utils.unquote(self.get("uri"))

src/s/c/scalarizr-HEAD/src/scalarizr/libs/metaconf/providers/nginx_pvd.py   scalarizr(Download)
from .ini_pvd import IniFormatProvider
from . import FormatProvider
from ..utils import quote, unquote
 
import re
    def write_statement(self, fp, node):
        if node.attrib.has_key('mc_type') and node.attrib['mc_type'] == 'statement':
            fp.write(self._pad*self._nesting + unquote(node.tag)+';\n')
            return True
        return False
 
    def write_section(self, fp, node):
        if node.attrib.has_key('mc_type') and node.attrib['mc_type'] == 'section':
            value = unquote(node.attrib['value']) if node.attrib.has_key('value') else ''
            fp.write(self._pad*self._nesting + unquote(node.tag) + ' ' + value + ' {\n')
    def write_option(self, fp, node):
        if node.attrib.has_key('mc_type') and node.attrib['mc_type'] == 'option':
            values = node.text.split('\n')
            fp.write (self._pad*self._nesting + unquote(node.tag)+ self._pad + unquote(values.pop(0)))
            if len(values):

src/s/c/scalarizr-HEAD/src/scalarizr/libs/metaconf/providers/mysql_pvd.py   scalarizr(Download)
from . import FormatProvider
from .. import MetaconfError
from ..utils import quote, unquote
 
import os
    def write_statement(self, fp, node):
        if node.attrib.has_key('mc_type') and node.attrib['mc_type'] == 'statement':
            fp.write(unquote(node.tag)+'\n')
            return True
        return False
 
    def write_include(self, fp, node):
        if node.attrib.has_key('mc_type') and node.attrib['mc_type'] == 'include':
            fp.write(unquote(node.tag)+" "+node.text.strip()+'\n')

src/s/c/scalarizr-HEAD/src/scalarizr/libs/metaconf/__init__.py   scalarizr(Download)
from fnmatch import fnmatch
 
from utils import quote, unquote, indent, strip_quotes
 
if sys.version_info[0:2] >= (2, 7):
 
        if not temp_nodes:
            raise MetaconfError("Path %s doesn't exist" % unquote(path))
        for temp_node in temp_nodes:
            for child in temp_node:

src/s/c/scalarizr-HEAD/src/scalarizr/libs/metaconf/providers/haproxy_pvd.py   scalarizr(Download)
from .ini_pvd import IniFormatProvider
from .. import MetaconfError
from ..utils import quote, unquote
 
import sys
    def write_section(self, fp, node):
        if node.attrib.has_key('mc_type') and node.attrib['mc_type'] == 'section':
            fp.write(unquote(node.tag))
            value = node.text
            if value.strip():
    def write_option(self, fp, node):
        if not callable(node.tag) and node.attrib.has_key('mc_type') and node.attrib['mc_type'] == 'option':
            fp.write("\t" + unquote(node.tag))
            value = node.text
            if value:

src/s/c/scalarizr-HEAD/src/scalarizr/libs/metaconf/providers/apache_pvd.py   scalarizr(Download)
'''
 
from ..utils import quote, unquote
from .ini_pvd import IniFormatProvider, FormatProvider
 
    def write_option(self, fp, node):
        if node.attrib.has_key('mc_type') and node.attrib['mc_type'] == 'option':
            fp.write(self._pad*self._nesting + unquote(node.tag)+"\t"+node.text+'\n')
            return True
        return False
    def write_section(self, fp, node):
        if node.attrib.has_key('mc_type') and node.attrib['mc_type'] == 'section':
            text = node.text.strip()
            value = ' ' + node.attrib['value'] if node.attrib.has_key('value') else ''
            tag = unquote(node.tag)

src/s/c/scalarizr-HEAD/src/scalarizr/libs/metaconf/providers/redis_pvd.py   scalarizr(Download)
from .ini_pvd import IniFormatProvider
from .. import MetaconfError
from ..utils import quote, unquote
 
if sys.version_info[0:2] >= (2, 7):
    def write_option(self, fp, node):
        if node.attrib.has_key('mc_type') and node.attrib['mc_type'] == 'option':
            value = node.text
            fp.write(unquote(node.tag)+" "+value+'\n')
            return True

src/s/c/scalarizr-HEAD/src/scalarizr/libs/metaconf/providers/ini_pvd.py   scalarizr(Download)
from . import FormatProvider
from .. import MetaconfError
from ..utils import quote, unquote
import os
import re
    def write_section(self, fp, node):
        if node.attrib.has_key('mc_type') and node.attrib['mc_type'] == 'section':
            fp.write('['+unquote(node.tag)+']\n')
            self.write(fp, node, False)
            return True
            if re.search('\s', value) or value == '':
                value = '"' + value + '"'
            fp.write(unquote(node.tag)+"\t= "+value+'\n')
            return True
        return False

src/s/c/scalarizr-HEAD/src/scalarizr/libs/metaconf/providers/__init__.py   scalarizr(Download)
from __future__ import with_statement
from .. import ParseError, MetaconfError
from ..utils import quote, unquote, indent
 
import sys
                        break
                else:
                    errors.append(unquote(section.tag))
            if errors:
                raise MetaconfError(errors)

src/s/c/scalarizr-HEAD/src/scalarizr/libs/metaconf/providers/erlang_pvd.py   scalarizr(Download)
from . import FormatProvider, ET
from .. import MetaconfError, ParseError
from ..utils import quote, unquote
 
try:
            fp.write(ident)
            fp.write('{')
            fp.write(unquote(node.tag))
            fp.write(', ')
            if len(node):
                else:
                    ''' list of simple values '''
                    list_val = ', '.join([unquote(el.tag) for el in nodes])
                    fp.write(list_val)
 

  1 | 2  Next