Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Quotes not working properly #27

jiaaro opened this Issue · 7 comments

5 participants


I tried the following in a script and got an error

>>> r ="mail --subject='MPAdmin Notice: Server out of RAM' 'my@email.address'", data="\nTest Message\n")
>>> r.std_err 
"Cannot parse address `Notice:' (while expanding `Notice:'): Format of RFC822 object is bad\n"
>>> r.command 

Had to double escape the subject line like so:"mail --subject='MPAdmin\ Notice:\ Server\ out\ of\ RAM' 'my@email.address'", data="Test Message\n")

As an additional little tidbit, it seems the data kwarg requires a trailing newline to work properly, that's not such a big deal though. It might be specific to mail and not related to envoy.

Thanks for the great lib :)


Same issue here :)


Ok, it seems to be fixed in version from git. Could anyone update easy_install packages? :)


can maintainer on pypi update package?


commit e8e4c70#envoy/ breaks this again ?

if test is changed to
sentinel = '#quoted_args' * 3
it wont raise error with posix=True, but it will still fail !?


adding splitter.commenters = '' fix test with sentinel = '#quoted_args' * 3, but Issue #29 is still there shlex should not split if | is in quotes.

@ibeex ibeex referenced this issue from a commit in ibeex/envoy
@ibeex ibeex fix regarding issue #27
Added pycharm to gitignore
Added 2 more tests regarding quoted characters one with # in quote and
other with | in quote
Fix for issue #27
 first split by space then recreate list splited by | sinece shlex
without posix=Trou would split if | was in quote and added commenters =
'' include # in string
@ibeex ibeex referenced this issue

Fix for issue #27 #47

von commented

Just a note that this problem still exists with the latest envoy from 'pip install envoy'


This project is in a bit of a crisis state — it's really useful, and I use it on a daily basis. However, I wrote it in a few afternoons several years ago and haven't touched it since. In order to get the project into a stable state I'm closing all issues and pull requests

Don't take this as aggressive — it's just necessary for the project to make any progress any time soon (it's pretty clear the project is effectively unmaintained at the moment). Great things to come! Please watch the GitHub logs and feel free to re-open this discussion soon. I just need to really it into a good state first.

:sparkles: :heart: :sparkles:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.