Robert Rawlins - Think Blue wrote:
Hello guys,
I've recently ported my application from bash to python, however there are
still a few bash line utilities I -have- to use in the application as there
isn't any alternative available to me. In the old days of bash I would have
grep'd the output
In article <[EMAIL PROTECTED]>,
David Bear <[EMAIL PROTECTED]> wrote:
>I'm using popen2 and getting an extra 1 at the end of my output. I didn't
>see where this was explained in the docs so I clearly don't understand the
>behavior. My code is simple.
>
>(input, output) = os.popen2('whackyperlprog
> Piet van Oostrum <[EMAIL PROTECTED]> (PvO) wrote:
>PvO> He didn't state that he has no control over that program. I.e. if it is a
>PvO> program that he has source code of, he could change its behaviour to use a
>PvO> named pipe.
He could do the initial run of the program with stdin and stdo
> Grant Edwards <[EMAIL PROTECTED]> (GE) wrote:
>GE> On 2005-10-29, Piet van Oostrum <[EMAIL PROTECTED]> wrote:
>GE> That would require that the application know about the named
>GE> pipe and open it. I don't think there is any way to swap a
>GE> pipe in for stdin/stdout once a process is run
On 2005-10-29, Piet van Oostrum <[EMAIL PROTECTED]> wrote:
>>GE> That would require that the application know about the named
>>GE> pipe and open it. I don't think there is any way to swap a
>>GE> pipe in for stdin/stdout once a process is running.
>
> Sure. 'myprogram' should be designed to comm
> Grant Edwards <[EMAIL PROTECTED]> (GE) wrote:
>GE> On 2005-10-29, Piet van Oostrum <[EMAIL PROTECTED]> wrote:
"g.franzkowiak" <[EMAIL PROTECTED]> (gf) wrote:
>>>
>gf> If starts a process with popen2.popen3('myprogram') and myprogram.exe is
>gf> running before, I've a connection to
Quoth Pierre Hanser <[EMAIL PROTECTED]>:
| Grant Edwards a écrit :
|> On 2005-10-29, Piet van Oostrum <[EMAIL PROTECTED]> wrote:
|>>>"g.franzkowiak" <[EMAIL PROTECTED]> (gf) wrote:
|>>
|>>>gf> If starts a process with popen2.popen3('myprogram') and myprogram.exe is
|>>>gf> running before, I've
Grant Edwards a écrit :
> On 2005-10-29, Piet van Oostrum <[EMAIL PROTECTED]> wrote:
>
>>>"g.franzkowiak" <[EMAIL PROTECTED]> (gf) wrote:
>>
>>>gf> If starts a process with popen2.popen3('myprogram') and myprogram.exe is
>>>gf> running before, I've a connection to the second process, not to t
On 2005-10-29, Piet van Oostrum <[EMAIL PROTECTED]> wrote:
>> "g.franzkowiak" <[EMAIL PROTECTED]> (gf) wrote:
>
>>gf> If starts a process with popen2.popen3('myprogram') and myprogram.exe is
>>gf> running before, I've a connection to the second process, not to the
>>first.
>>gf> I can find th
> "g.franzkowiak" <[EMAIL PROTECTED]> (gf) wrote:
>gf> If starts a process with popen2.popen3('myprogram') and myprogram.exe is
>gf> running before, I've a connection to the second process, not to the first.
>gf> I can find the process by name before I start a process with popen2...,
>gf> but
David Wahler schrieb:
> g.franzkowiak wrote:
>
>>I start a process in my application with popen2.popen3('MyOtherProcess').
>>That's ok, but what can I do if the other process is running ?
>>Can I fetch some information and start with that ?
>>
>>gerd
>
>
> It's not clear what you're asking for.
g.franzkowiak wrote:
> I start a process in my application with popen2.popen3('MyOtherProcess').
> That's ok, but what can I do if the other process is running ?
> Can I fetch some information and start with that ?
>
> gerd
It's not clear what you're asking for. Could you please clarify?
-- David
Actually, "-test1" is a text argument that testme.exe should receive
from standard input. For example,
Executing testme.exe generates the following output,
Please select one of the following options:
1) test1
2) test2
3) exit
Please enter your option here:-test1 <-This -test1 is what user would
typ
jb wrote:
> Hi there:
>
> I need help with popen2 usage. I am coding on Windows 2000 environment
> and I am basically trying to run command line executable program that
> accepts command line arguments from user. I want to be able to provide
> these arguments through input pipe so that executable
Klaus Alexander Seistrup wrote:
>Mage wrote:
>
>
>
>>I tried to write a proxy script for "psql" command. I need some
>>query log. I failed to read from the file object.
>>
>>
>
>The psql command is probably linked against readline; did you look
>in the ~/.psql_history file?
>
>
>
Thank you
Mage wrote:
> I tried to write a proxy script for "psql" command. I need some
> query log. I failed to read from the file object.
The psql command is probably linked against readline; did you look
in the ~/.psql_history file?
Cheers,
--
Klaus Alexander Seistrup
Magnetic Ink, Copenhagen, Denmar
alexrait1 wrote:
It does but that's not what I want. I need a class which I can query
for process termination for instance...
Is there a way to overcome this problem with Popen3?
If you're using Python 2.4 you should look into the subprocess module.
I think these docs might be what you're looking
It does but that's not what I want. I need a class which I can query
for process termination for instance...
Is there a way to overcome this problem with Popen3?
--
http://mail.python.org/mailman/listinfo/python-list
alexrait1 wrote:
I launch my python. Then I write this:
import popen2
popen2.Popen3("mplayer *.mpg")
it starts playing for 2 seconds.. and then stops...
if I quit python (ctrl - D)
mplayer continues to run and plays music as it should...
Any ideas?
It looks like the process you start is blocking on
It depends mostly on how the spawned process handles conditions like
closed pipes, EOF, etc.
In general and on *nix, any spawned and terminated process will become
and remain a zombie until "reaped", i.e. until the final status is
collected by a calling os.waitpid().
To avoid zombies, you should
[EMAIL PROTECTED] (Evgeni Sergeev) writes:
> Is there assurance that the process will terminate and not sit
> in memory orphaned, waiting on its stdin, for example?
The process should receive an EOF. It will typically handle EOF by
terminating, but that is not guaranteed.
--
http://mail.python.o
21 matches
Mail list logo