-
Notifications
You must be signed in to change notification settings - Fork 256
envoy doesn't support '>>', '<<' symbols in shell command. #19
Comments
Correct. :) |
so how to proceed ? |
+1, this would be useful |
Yes, let me crush my grey matter not now, after three days :) Thanks & Regards "Talk is cheap, show me the code" -- Linus Torvalds |
I'm torn on this. I'm not sure how this would be very useful programmatically. |
Since
|
Programmatically, it's about as easy to redirect as it is to compose an initial function: envoy.run("cat %s" % f1)
envoy.run("cat %s >> %s" % (f1,f2)) Granted "cat" is a bit contrived...the redirection does still save the extra keystrokes of opening a file with the appropriate mode, grabbing the stdout/stderr, and writing. with open(f2, "a") as h: h.write(envoy.run("cat f1").std_out) vs envoy.run("cat f1 >> %s" % f2) It feels more natural to use redirection in the command string. It would also seem consistent with the current API since piping is there. Thoughts? |
@amoffat : seems much better than the one i suggested. We can still think on it. |
how about performance and compatibility? will something like "with open(...) as h: h.write(envoy.run("pg_dump ...").std_out)" also work w/o problems? |
examples
We might need to write own grammar, i feel pbs should be handly when compared to envoy, @kennethreitz what you say ? |
Just ran into this. :/ Parsing shell commands is a tricky business, with a lot of subtle traps. But that's why I want a library to do it for me. ;) |
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. ✨ ❤️ ✨ |
In [24]: n = envoy.run("cat requirements.txt >> py.txt")
In [25]: n.std_err
Out[25]: 'cat: >>: No such file or directory\ncat: py.txt: No such file or directory\n'
The text was updated successfully, but these errors were encountered: