Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Quotes not working properly #27

jiaaro opened this Issue Apr 25, 2012 · 7 comments


None yet
5 participants

jiaaro commented Apr 25, 2012

I tried the following in a script and got an error

>>> r = envoy.run("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:

envoy.run("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? :)

ibeex commented Sep 26, 2012

can maintainer on pypi update package?

ibeex commented Oct 10, 2012

commit e8e4c70#envoy/core.py breaks this again ?

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

ibeex commented Oct 11, 2012

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 added a commit to ibeex/envoy that referenced this issue Oct 11, 2012

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 Oct 11, 2012


Fix for issue #27 #47

von commented Jul 4, 2013

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


kennethreitz commented Jan 8, 2014

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.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment