'piping' output

S

Steve

Hi,

I want to know if I can 'pipe' output from a program into a python
script. Is that possible? I need to pipe some output at runtime from a
program written in C and I want to parse it/use it in a python script.
I'm new so please bear with me. thanks


Steve
 
S

Steve

Steve said:
Hi,

I want to know if I can 'pipe' output from a program into a python
script. Is that possible? I need to pipe some output at runtime from a
program written in C and I want to parse it/use it in a python script.
I'm new so please bear with me. thanks


Steve

Just figured it out using popen2() :)

Steve
 
P

Paul Rubin

Steve said:
I want to know if I can 'pipe' output from a program into a python
script. Is that possible? I need to pipe some output at runtime from a
program written in C and I want to parse it/use it in a python
script. I'm new so please bear with me. thanks

Use the C library "popen" function.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top