Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(7)  |  Call(2)  |  Derive(0)  |  Import(5)
Return a backslash-dequoted version of 'text'.
If 'quote_char' is the single-quote, backslash-dequoting is
limited to single-quotes.

        def dequote_string(text, quote_char=''):
    """Return a backslash-dequoted version of 'text'.
    If 'quote_char' is the single-quote, backslash-dequoting is
    limited to single-quotes.
    """
    if len(text) > 1:
        qc = quote_char
        # Don't backslash-dequote characters between single-quotes,
        # except single-quotes.
        if qc == "'":
            text = text.replace("'\\''", "'")
        elif '\\' in text:
            text = backslash_dequote(text)
    return text
        


src/g/p/gpgkeys-1.23/gpgkeys/completions/key.py   gpgkeys(Download)
from gpgkeys.utils import b
 
from kmd.completions.quoting import dequote_string
from kmd.completions.quoting import quote_string
 
        if not matches:
            if completion.found_quote:
                text = dequote_string(text, completion.quote_character)
            if completion.quote_character:
                matches = self.complete(self.by_userid, text.lower())

src/g/p/gpgkeys-HEAD/gpgkeys/completions/key.py   gpgkeys(Download)
from gpgkeys.utils import b
 
from kmd.completions.quoting import dequote_string
from kmd.completions.quoting import quote_string
 
        if not matches:
            if completion.found_quote:
                text = dequote_string(text, completion.quote_character)
            if completion.quote_character:
                matches = self.complete(self.by_userid, text.lower())

src/g/p/gpgkeys-HEAD/gpgkeys/tests/test_quoting.py   gpgkeys(Download)
from kmd.completions.quoting import is_fully_quoted
from kmd.completions.quoting import char_is_quoted
from kmd.completions.quoting import dequote_string
from kmd.completions.quoting import quote_string
from kmd.completions.quoting import backslash_quote_string

src/k/m/kmd-2.2/kmd/tests/test_quoting.py   kmd(Download)
from kmd.completions.quoting import is_fully_quoted
from kmd.completions.quoting import char_is_quoted
from kmd.completions.quoting import dequote_string
from kmd.completions.quoting import quote_string
from kmd.completions.quoting import backslash_quote_string

src/g/p/gpgkeys-1.23/gpgkeys/tests/test_quoting.py   gpgkeys(Download)
from kmd.completions.quoting import is_fully_quoted
from kmd.completions.quoting import char_is_quoted
from kmd.completions.quoting import dequote_string
from kmd.completions.quoting import quote_string
from kmd.completions.quoting import backslash_quote_string