rclzip: add useSkippedNames variable to also use the base skippedNames

This commit is contained in:
Jean-Francois Dockes
2018-06-04 09:05:23 +02:00
parent ec4bb12df0
commit f3d3f5b0bf
3 changed files with 39 additions and 6 deletions
+18
View File
@@ -251,3 +251,21 @@ class ConfStack(object):
if v and dodecode:
v = v.decode('utf-8')
return v
def stringToStrings(s):
'''Parse a string made of space-separated words and C-Style strings
(double-quoted with backslash escape). E.g.:
word1 word2 "compound \\"quoted\\" string" ->
['word1', 'word2', 'compound "quoted string']'''
import shlex
lex = shlex.shlex(s, posix=True)
lex.quotes = '"'
lex.escape = '\\'
lex.escapedquotes = '"'
l = []
while True:
tok = lex.get_token()
if not tok:
break
l.append(tok)
return l