By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,957 Members | 1,969 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,957 IT Pros & Developers. It's quick & easy.

Popen3-style os.execl?

P: n/a
Hey folks,

I'm whipping up a quick CGI to wrap a command line app and I was a bit
suprised to not find a execl-like Popen3 style object. I don't want
to bother with the shell interpreting metacharaters by constructing a
command line.

Basically, I want something that acts just like Popen3 but allows me
to specify cmd as a path + args. Does something like this exist in
the standard library? If not, it sounds like a good candidate...

Cheers,
Chris
--
Chris Green <cm*@dok.org>
Don't use a big word where a diminutive one will suffice.
Jul 18 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
In article <m2************@catbert.dok.org>, Chris Green <cm*@dok.org>
wrote:
Hey folks,

I'm whipping up a quick CGI to wrap a command line app and I was a bit
suprised to not find a execl-like Popen3 style object. I don't want
to bother with the shell interpreting metacharaters by constructing a
command line.

Basically, I want something that acts just like Popen3 but allows me
to specify cmd as a path + args. Does something like this exist in
the standard library? If not, it sounds like a good candidate...


Did you try it? I think of Popen3 as something that
acts just like you describe, but also accepts a command
line. Not the best API, maybe.

Donn Cave, do**@u.washington.edu
Jul 18 '05 #2

P: n/a
Chris Green <cm*@dok.org> writes:
Hey folks,

I'm whipping up a quick CGI to wrap a command line app and I was a bit
suprised to not find a execl-like Popen3 style object. I don't want
to bother with the shell interpreting metacharaters by constructing a
command line.

Basically, I want something that acts just like Popen3 but allows me
to specify cmd as a path + args. Does something like this exist in
the standard library? If not, it sounds like a good candidate...


Um. Can't you pass a list to the Popen3 constructor?

Cheers,
mwh

--
same software, different verbosity settings (this one goes to
eleven) -- the effbot on the martellibot
Jul 18 '05 #3

P: n/a
Michael Hudson <mw*@python.net> writes:
Um. Can't you pass a list to the Popen3 constructor?


Well, by golly ya can. Since cmd is only ever one argument in the
docs, I've never known that you could do this.
--
Chris Green <cm*@dok.org>
This is my signature. There are many like it but this one is mine.
Jul 18 '05 #4

P: n/a
Chris Green <cm*@dok.org> writes:
Michael Hudson <mw*@python.net> writes:
Um. Can't you pass a list to the Popen3 constructor?


Well, by golly ya can. Since cmd is only ever one argument in the
docs, I've never known that you could do this.


Ah, uh, right: this isn't documented. I'm not sure why... as noted,
it doesn't work on Windows, but then if you were talking about execl,
you presumably aren't that concerned.

Cheers,
mwh

--
Reading Slashdot can [...] often be worse than useless, especially
to young and budding programmers: it can give you exactly the wrong
idea about the technical issues it raises.
-- http://www.cs.washington.edu/homes/k...t.html#reasons
Jul 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.