On Sat, Aug 4, 2018 at 12:03 AM, Oscar Benjamin
wrote:
> On 2 August 2018 at 20:54, wrote:
>>
>>> As others have mentioned, separate threads for the individual pipes
>>> may help, or if you need to go that far there are specialised
>>> libraries, I believe (pexpect is one, but from what I know
On 2 August 2018 at 20:54, wrote:
>
>> As others have mentioned, separate threads for the individual pipes
>> may help, or if you need to go that far there are specialised
>> libraries, I believe (pexpect is one, but from what I know it's fairly
>> Unix-specific, so I'm not very familiar with
On 8/2/2018 3:52 PM, cseber...@gmail.com wrote:
subprocess is not meant for interaction through the pipes. That is why,
I have been told, IDLE uses a socket for interaction. Multiprocess is
apparently better suited for interaction without resorting to a socket.
So use normal socket on
On Thu, 2 Aug 2018 at 20:58, wrote:
> > Sorry, but there's no "simple" answer here for you (although you may
> > well be able to get something that works well enough for your specific
> > needs - but it's not obvious from your snippet of code what you're
> > trying to achieve).
>
> To send and
> Another possibility: If the ONLY thing you're doing with stdout/stderr
> is passing them through to the screen, simply don't change them. Let
> them remain bound to the console. You can have a pipe for stdin
> without also having pipes for the others. But that won't work if you
> intend to do
> subprocess is not meant for interaction through the pipes. That is why,
> I have been told, IDLE uses a socket for interaction. Multiprocess is
> apparently better suited for interaction without resorting to a socket.
So use normal socket on localhost for this? Don't you still need
> As others have mentioned, separate threads for the individual pipes
> may help, or if you need to go that far there are specialised
> libraries, I believe (pexpect is one, but from what I know it's fairly
> Unix-specific, so I'm not very familiar with it).
I'm on Linux so pexpect is a
> -I think the Python interpreter actually sends its output to stderr, so to
> capture it you'd probably want it to go to the same place as stdout, so use
> stderr = subprocess.STDOUT
Yes that captured the error messages! Thanks!
> -You're only reading 1 line out output for each thing, so
On Thu, Aug 2, 2018 at 6:46 PM, Paul Moore wrote:
> On Wed, 1 Aug 2018 at 21:17, wrote:
>>
>> I can run python3 interactively in a subprocess w/ Popen but
>> if I sent it text, that throws an exception, the process freezes
>> instead of just printing the exception like the normal interpreter..
On Wed, 1 Aug 2018 at 21:17, wrote:
>
> I can run python3 interactively in a subprocess w/ Popen but
> if I sent it text, that throws an exception, the process freezes
> instead of just printing the exception like the normal interpreter..
> why? how fix? Here is my code below.
>
> (I suspect
On 8/1/2018 4:11 PM, cseber...@gmail.com wrote:
I can run python3 interactively in a subprocess w/ Popen but
if I sent it text, that throws an exception, the process freezes
instead of just printing the exception like the normal interpreter..
why? how fix? Here is my code below.
(I suspect
A couple notes:
-I think the Python interpreter actually sends its output to stderr, so to
capture it you'd probably want it to go to the same place as stdout, so use
stderr = subprocess.STDOUT
-You're only reading 1 line out output for each thing, so if 1 command creates
multiple lines of
On Thu, Aug 2, 2018 at 6:11 AM, wrote:
> I can run python3 interactively in a subprocess w/ Popen but
> if I sent it text, that throws an exception, the process freezes
> instead of just printing the exception like the normal interpreter..
> why? how fix? Here is my code below.
>
> (I suspect
13 matches
Mail list logo