Anthony Sottile <asott...@umich.edu> added the comment:

Try with `sh`:

(it prompts for continuation, I pressed ^D to end it)

$ export F=$'\''
> 
> 
> 
> 
> sh: 8: Syntax error: Unterminated quoted string


dollar-sign strings are a `bash` extension, I don't think they're supported by 
*sh*lex (maybe if there was a bashlex module :D)

There's the `posix=False` option to `shlex.split` -- I'm not sure what it 
does/doesn't enable though (the docs aren't thorough here and the code is a bit 
non-obvious):

>>> shlex.split(s, posix=False)
['export', "F=$'\\''"]

----------
nosy: +Anthony Sottile

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38570>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to