Tim Arnold <[EMAIL PROTECTED]> wrote:
> Just discovered that my subprocess call with the preexec_fn wasn't doing
> what I thought.
> If 'machine' value is different than the current machine name, I want to
> remsh the command to that machine, but obviously I misunderstood the
> preexec_fn a
"Nick Craig-Wood" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Tim Arnold <[EMAIL PROTECTED]> wrote:
>> Should I just put the remsh in the actual command instead of
>> preexec_fn?
>
> Yes.
>
> The preexec_fn is run after the fork() but before the exec(). Ie a
> new process has
Tim Arnold wrote:
> If 'machine' value is different than the current machine name, I want to
> remsh the command to that machine, but obviously I misunderstood the
> preexec_fn arg.
I don't think the return value of preexec_fn is used for anything. You
can use to do things like set process gro
Hi,
Just discovered that my subprocess call with the preexec_fn wasn't doing
what I thought.
If 'machine' value is different than the current machine name, I want to
remsh the command to that machine, but obviously I misunderstood the
preexec_fn arg.
Should I just put the remsh in the actual co
In article <[EMAIL PROTECTED]>,
Fredrik Lundh <[EMAIL PROTECTED]> wrote:
>Cameron Laird wrote:
>
>> Your interactive session does indeed exhibit the behavior that
>> puzzles me. My expectation was that StringIO and the std*
>> parameters to Popen() were made for each other; certainly there
>> ar
Cameron Laird wrote:
> Your interactive session does indeed exhibit the behavior that
> puzzles me. My expectation was that StringIO and the std*
> parameters to Popen() were made for each other; certainly there
> are many cases where stdout and stderr can be redirected *to* a
> StringIO. Is it
Cameron Laird a écrit :
> In article <[EMAIL PROTECTED]>,
> Nick Craig-Wood <[EMAIL PROTECTED]> wrote:
>> Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
>>> On Thu, 17 Aug 2006 17:16:25 +, [EMAIL PROTECTED] (Cameron Laird)
>>> declaimed the following in comp.lang.python:
>>>
Question:
>>>
In article <[EMAIL PROTECTED]>,
Nick Craig-Wood <[EMAIL PROTECTED]> wrote:
>Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
>> On Thu, 17 Aug 2006 17:16:25 +, [EMAIL PROTECTED] (Cameron Laird)
>> declaimed the following in comp.lang.python:
>>
>> > Question:
>> > import subprocess, StringIO
Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> On Thu, 17 Aug 2006 17:16:25 +, [EMAIL PROTECTED] (Cameron Laird)
> declaimed the following in comp.lang.python:
>
> > Question:
> > import subprocess, StringIO
> >
> > input = StringIO.StringIO("abcdefgh\nabc\n")
>
> Here you overri
Question:
import subprocess, StringIO
input = StringIO.StringIO("abcdefgh\nabc\n")
# I don't know of a compact, evocative, and
# cross-platform way to exhibit this behavior.
# For now, depend on cat(1).
p = subprocess.Popen(["cat"], stdout = subprocess.PIPE,
10 matches
Mail list logo