def shlex_quotes(value):
 lex = shlex.shlex(value)
 lex.quotes = '"'
 lex.whitespace_split = True
 lex.commenters = ''
 return list(lex)

def shlex_quotes ( value ) : lex = shlex . shlex ( value ) lex . quotes = '"' lex . whitespace_split = True lex . commenters = '' return list ( lex )
see URL .