classification
Title: shlex.split() does not tokenize like the shell
Type: feature request Stage: test needed
Components: Library (Lib) Versions: Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: robodan (1)
Priority: normal Keywords:

Created on 2006-07-13 17:44 by robodan, last changed 2009-03-30 05:06 by ajaksu2.

Messages (1)
msg60940 - (view) Author: Dan Christian (robodan) Date: 2006-07-13 17:44
When shlex.split defines tokens, it doesn't properly
interpret ';', '&', and '&&'.  These should always be
place in a separate token (unless inside a string).

The shell treats the following as identical cases, but
shlex.split doesn't:

echo hi&&echo bye
echo hi && echo bye

echo hi;echo bye
echo hi ; echo bye

echo hi&echo bye
echo hi & echo bye

shlex.split makes these cases ambiguous:

echo 'foo&'
echo foo&

echo '&&exit'
echo &&exit
History
Date User Action Args
2009-03-30 17:04:08ajaksu2linkissue1699594 dependencies
2009-03-30 05:06:57ajaksu2setstage: test needed
type: feature request
versions: + Python 2.7, - Python 2.3
2006-07-13 17:44:33robodancreate