command.py 文件源码

python
阅读 35 收藏 0 点赞 0 评论 0

项目:jiveplot 作者: haavee 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号