Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Does not support asterisk symbol in command #20

Closed
bufordsweatley opened this Issue · 4 comments

3 participants

bufordsweatley pistacchio Kenneth Reitz
bufordsweatley

I'm trying to run this command through KennethReitz's Envoy package:

$ sqlite3 foo.db 'select * from sqlite_master' 

I've tried this:

r = envoy.run("sqlite3 foo.db 'select * from sqlite_master'")
sqlite3: Error: too many options: "*"

and this:

r = envoy.run(['sqlite3', 'foo.db', 'select * from sqlite_master'])
AttributeError: 'NoneType' object has no attribute 'returncode'

additional quoting & escaping doesn't seem to help. Any suggestions?

FYI: This is what I had to do for now:

cmd = "sqlite3 %(database)s 'select * from sqlite_master'" % locals()
os.system(cmd)

Note that this is a contrived example, and that most of the unix shell commands that I'd like to issue aren't just a simple select that could be easily done via SQLAlchemy.

From http://stackoverflow.com/questions/9106350/how-to-use-wildcards-with-envoy

bufordsweatley

More info from JF Sebastion:

r = envoy.run([["sqlite3", "foo.db", "select * from sqlite_master"]])
print r.std_out

Thanks - the list within a list for envoy did the trick. Can you tell me what's going on there? – Buford Sweatley 1 hour ago

@Buford Sweatley: I've just looked at the source. The original problem (string argument) seems like a bug in envoy. – J.F. Sebastian 1 hour ago

pistacchio

Still nothing about this?

Kenneth Reitz
Owner

I'm fairly busy :)

Kenneth Reitz
Owner

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.