Kevin Peterson writes:
> I want to use the stdout of child process as an input of another thread, but
> some how I am not able to read the stdout. Using Popen I have created a
> child process and stdout of it I have redirected to PIPE (because I don't
> want that to be printed on with my main
On Wed, 27 Oct 2010 16:24:29 -0400
Not To Miss wrote:
> I have a question on subprocess.Popen, as shown comparably below. When I ran
> 1.py, it prints "0". I don't understand how the file is empty. Isn't it
> flushed when the file object "out" is closed? On the other hand, running
> 2.py prints co
Paul Lemelle wrote:
HELP! :)
I am trying to output the following program's output to either a file
or variable, how can this be done?
# Writing the output to a standard argv argument
#1/usr/bin/python
import sys
for arg in sys.argv:
print arg
#END
Thanks,
Paul
Hi Paul, after reading
> >> > Can I allocate a second console window, so I can place certain output
> >> > to that directly, and leave the original streams alone? I tried
> >> Have you tried using the creationflags argument to subprocess.Popen?
> >> Specially the CREATE_NEW_CONSOLE flag. See the Microsoft documentation
En Tue, 18 Mar 2008 07:09:08 -0300, <[EMAIL PROTECTED]> escribió:
> On Mar 17, 8:16 pm, Gabriel Genellina <[EMAIL PROTECTED]> wrote:
>> On 17 mar, 19:43, [EMAIL PROTECTED] wrote:
>>
>> > Can I allocate a second console window, so I can place certain output
>> > to that directly, and leave the orig
> > >>> Can I allocate a second console window, so I can place certain output
> > >>> to that directly, and leave the original streams alone?
>
> > I've rather lost track of what you're trying to do, but I would
> > second Gabriel's suggestion of the standard Windows method of
> > debug output: u
On Mar 18, 8:51 am, Tim Golden <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> >>> Can I allocate a second console window, so I can place certain output
> >>> to that directly, and leave the original streams alone?
>
> I've rather lost track of what you're trying to do, but I would
> seco
[EMAIL PROTECTED] wrote:
>>> Can I allocate a second console window, so I can place certain output
>>> to that directly, and leave the original streams alone?
I've rather lost track of what you're trying to do, but I would
second Gabriel's suggestion of the standard Windows method of
debug outpu
On Mar 17, 8:16 pm, Gabriel Genellina <[EMAIL PROTECTED]> wrote:
> On 17 mar, 19:43, [EMAIL PROTECTED] wrote:
>
> > Can I allocate a second console window, so I can place certain output
> > to that directly, and leave the original streams alone? I tried some
> > things in subprocess (Py 3a3 /WinXP
On 17 mar, 19:43, [EMAIL PROTECTED] wrote:
> Can I allocate a second console window, so I can place certain output
> to that directly, and leave the original streams alone? I tried some
> things in subprocess (Py 3a3 /WinXP) but they failed. I don't know if
> it's supposed to be possible though,
On Mar 17, 8:16 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Sun, 16 Mar 2008 22:27:28 -0200, <[EMAIL PROTECTED]> escribió:
>
> > Specifically, before the prompts. Where does the prompt write come
> > from; why doesn't it honor my settings of sys.stdout and sys.stderr?
>
> The interacti
En Sun, 16 Mar 2008 22:27:28 -0200, <[EMAIL PROTECTED]> escribió:
> Specifically, before the prompts. Where does the prompt write come
> from; why doesn't it honor my settings of sys.stdout and sys.stderr?
The interactive interpreter uses directly the C predefined streams stdout
and stderr.
-
Hi,
> I'm extending a windows application (C++) by embedding Python calls.
> It seems to be a known problem that windows applications detach
> immediately from the calling console, so that all output to stdout
> (from both C++ and Python) doesn't get shown anywhere.
>
> A workaround seems to be
Robert Bauck Hamar wrote:
> hg wrote:
>
>> Robert Bauck Hamar wrote:
>>
>>> hg wrote:
>>>
Hi,
I have the following
* C extention - redir.c
#include "Python.h"
PyObject * test_redir_test(PyObject *self) {
fprintf(
hg wrote:
> Robert Bauck Hamar wrote:
>
>> hg wrote:
>>
>>> Hi,
>>>
>>> I have the following
>>>
>>> * C extention - redir.c
>>>
>>>
>>> #include "Python.h"
>>>
>>> PyObject * test_redir_test(PyObject *self) {
>>> fprintf(stdout, "Hello from an extention!\n");
>>> P
Robert Bauck Hamar wrote:
> hg wrote:
>
>> Hi,
>>
>> I have the following
>>
>> * C extention - redir.c
>>
>>
>> #include "Python.h"
>>
>> PyObject * test_redir_test(PyObject *self) {
>> fprintf(stdout, "Hello from an extention!\n");
>> Py_INCREF(Py_None);
>> retur
hg wrote:
> Hi,
>
> I have the following
>
> * C extention - redir.c
>
>
> #include "Python.h"
>
> PyObject * test_redir_test(PyObject *self) {
> fprintf(stdout, "Hello from an extention!\n");
> Py_INCREF(Py_None);
> return Py_None;
> }
>
[...]
> **
On May 28, 4:54 am, "Troels Thomsen" wrote:
> Hello All
>
> I have trouble printing to stdout from a thread and main program.
>
> Not only will it look strange when they try to print at the same time, that
> is ok, but i think i see lock-ups. (strange exceptions in Tkinker etc) Or is
> it an issue
[EMAIL PROTECTED] wrote:
> Dear Users,
>
> I am trying to recover through the python function
> popen3 the stdout,in,err of a launched process.
>
> I would like also to recover the stdout which you can
> get only through the command: command1 >& filename
>
> Do you know how I can access to th
On Apr 14, 2:49 am, [EMAIL PROTECTED] wrote:
> Dear Users,
>
> I am trying to recover through the python function
> popen3 the stdout,in,err of a launched process.
>
> I would like also to recover the stdout which you can
> get only through the command: command1 >& filename
>
> Do you know how I
On Wednesday 18 October 2006 00:25, Fredrik Lundh wrote:
> |feature. the "exec" system call operates on a lower level than the
> |stdio buffering system.
I did in this manner:
for exe in ('imap4', 'pop3'):
if exe in cfgfil[optsrv + '.protocol']:
exe = exe[:4]; exe = 'cal
If you wanted to make sure stdio was flushed you could always do...
sys.stdout.write("Message\n")
sys.stdout.flush()
Thomas Guettler wrote:
> Hi,
>
> I noticed, that sys.stout does not get flushed before the process is
> replaced. The last print statements (before execvp()) disappear.
>
> It only
Thomas Guettler wrote:
> Is this a bug or feature?
feature. the "exec" system call operates on a lower level than the
stdio buffering system.
--
http://mail.python.org/mailman/listinfo/python-list
On 2006-07-13, notanotheridiot <[EMAIL PROTECTED]> wrote:
> Hi-
>
> I'm trying to exec some arbitrary code in one thread of an application
> and read anything it prints to stdout or stderr in another thread. My
> question is how?
>
> I've tried changing sys.stdout, but that changes stdout for the w
sorry i meant i installed python version 2.4.1, thanks
MKoool wrote:
> I just installed python 2.4 for windows. I was using the cygwin
> version previously, but wanted to use the official python 2.4 release
> to install a module that reads off some registry entries.
>
> After installing, I did wh
sorry, i'm an idoit who just found that i should use the -u option, my
bad
--
http://mail.python.org/mailman/listinfo/python-list
26 matches
Mail list logo