kennethreitz/envoy — Issue #20: Does not support asterisk symbol in command
Author: bufordsweatley
Created: 2012-02-02 17:19:44+00:00
State: open

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