Calling subprocess with arguments

Mike Kazantsev mk.fraggod at gmail.com
Fri Jun 19 12:09:20 EDT 2009


On Fri, 19 Jun 2009 22:00:28 +0600
Mike Kazantsev <mk.fraggod at gmail.com> wrote:

> On Fri, 19 Jun 2009 08:28:17 -0700
> Tyler Laing <trinioler at gmail.com> wrote:
> 
> > Thanks mike, the idea that maybe some of the info isn't being passed is
> > certainly interesting.
> > 
> > Here's the output of os.environ and sys.argv:
> >
> ...
> 
> I'm afraid these doesn't make much sense without the output from the
> second results, from py itself. My suggestion was just to compare them
> - pop the py shell, eval the outputs into two sets, do the diff and
> you'll see it at once.
> If there's an empty set then I guess it's pretty safe to assume that
> python creates subprocess in the same way the shell does.

Just thought of one more really simple thing I've missed: vlc might
expect it's remote to work with tty, so when py shoves it a pipe
instead, it automatically switches to non-interactive mode.

You can remedy that a bit by superclassing subprocess.Popen, replacing
pipes with pty, but they are quite hard to work with, prehaps pexpect
module would be of some use there:

  http://pypi.python.org/pypi/pexpect/

-- 
Mike Kazantsev // fraggod.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 205 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20090619/b48aca3c/attachment-0001.sig>


More information about the Python-list mailing list