Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #53981
| Path | csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <gherron@digipen.edu> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.182 |
| X-Spam-Level | * |
| X-Spam-Evidence | '*H*': 0.64; '*S*': 0.01; 'subject:skip:s 10': 0.07; 'bytes.': 0.09; 'byte,': 0.16; 'skip:f 60': 0.16; 'subject:key': 0.16; 'wrote:': 0.18; 'written': 0.21; 'command': 0.22; 'import': 0.22; 'header:User-Agent:1': 0.23; 'byte': 0.24; 'question': 0.24; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; "doesn't": 0.30; 'code': 0.31; 'gary': 0.31; 'pipe': 0.31; 'another': 0.32; 'could': 0.34; 'but': 0.35; 'really': 0.36; 'method': 0.36; 'thanks': 0.36; 'received:10': 0.37; 'whatever': 0.38; 'to:addr :python-list': 0.38; 'expect': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'read': 0.60; 'tell': 0.60; 'response.': 0.68; 'institute': 0.72; 'received:10.10': 0.74; 'received:204': 0.75; 'behavior': 0.77; 'dr.': 0.77; 'transfer': 0.82; 'skip:] 20': 0.84; 'subject:Send': 0.84; 'examine': 0.93 |
| Date | Wed, 11 Sep 2013 10:43:09 -0700 |
| From | Gary Herron <gherron@digipen.edu> |
| User-Agent | Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130803 Thunderbird/17.0.8 |
| MIME-Version | 1.0 |
| To | python-list@python.org |
| Subject | Re: Send alt key to subprocess.PIPE stdin |
| References | <38b49476-607e-43ed-bd70-804ff8329ad0@googlegroups.com> |
| In-Reply-To | <38b49476-607e-43ed-bd70-804ff8329ad0@googlegroups.com> |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.257.1378921806.5461.python-list@python.org> (permalink) |
| Lines | 32 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1378921806 news.xs4all.nl 15920 [2001:888:2000:d::a6]:51802 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:53981 |
Show key headers only | View raw
On 09/11/2013 07:26 AM, Wanderer wrote:
> How do I send the command 'Alt+D' to subprocess.PIPE?
>
> My code is
>
> import subprocess
> rsconfig = subprocess.Popen(["C:\Program Files\Photometrics\PVCam64\utilities\RSConfig\RSConfig.exe", ],stdin=subprocess.PIPE)
>
> rsconfig.stdin.write('Alt+D')
>
> Thanks
That question doesn't really make sense. A pipe provides a method to
transfer a stream of bytes. You could indeed send that byte across the
pipe, but it's just a byte, written by one process and read by another
process. The receiving process can examine the byte stream, and do
whatever it wants in response.
By calling it a _command_, you seem to expect some particular behavior
out of the receiving process. Please tell us *what* that might be, and
we'll see what we can do to help out.
Gary Herron
--
Dr. Gary Herron
Department of Computer Science
DigiPen Institute of Technology
(425) 895-4418
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Send alt key to subprocess.PIPE stdin Wanderer <wanderer@dialup4less.com> - 2013-09-11 07:26 -0700
Re: Send alt key to subprocess.PIPE stdin Nobody <nobody@nowhere.com> - 2013-09-11 18:18 +0100
Re: Send alt key to subprocess.PIPE stdin Gary Herron <gherron@digipen.edu> - 2013-09-11 10:43 -0700
Re: Send alt key to subprocess.PIPE stdin Wanderer <wanderer@dialup4less.com> - 2013-09-11 13:15 -0700
Re: Send alt key to subprocess.PIPE stdin Dave Angel <davea@davea.name> - 2013-09-11 20:23 +0000
Re: Send alt key to subprocess.PIPE stdin Wanderer <wanderer@dialup4less.com> - 2013-09-12 07:06 -0700
Re: Send alt key to subprocess.PIPE stdin Chris Angelico <rosuav@gmail.com> - 2013-09-13 01:27 +1000
Re: Send alt key to subprocess.PIPE stdin Nobody <nobody@nowhere.com> - 2013-09-12 18:20 +0100
csiph-web