def quote_split(s, splitchar=';'):
rv = [""]
inquote = False
for i in xrange(len(s)):
if not inquote and s[i]==splitchar:
rv.append( "" )
continue
rv[-1] = rv[-1] + s[i]
if s[i]=="'":
inquote = not inquote
return rv
## Return a compiled regex which matches the word-boundaried word 'x'
## See http://docs.python.org/2/library/re.html under the "\b"
## special matcher
评论列表
文章目录