467,906 Members | 1,721 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,906 developers. It's quick & easy.

Getting stdout from ctypes module

Hi everyone, I have a program which is written in C and interfaced
with python via
Ctypes. The functions I call print stuff out to the console, using
the usual function printf. I would like to know if it is possible to
redirect the output of my C module to python. I'm working on windows
environment. Thanks in advance.

Mar 2 '07 #1
  • viewed: 1759
Share:
1 Reply
En Fri, 02 Mar 2007 07:54:55 -0300, Massi <ma*******@msn.comescribió:
Hi everyone, I have a program which is written in C and interfaced
with python via
Ctypes. The functions I call print stuff out to the console, using
the usual function printf. I would like to know if it is possible to
redirect the output of my C module to python. I'm working on windows
environment. Thanks in advance.
Is it a DLL or a program?
For a program I don't see how you could use ctypes to invoke things - and
for a DLL it's strange to use printf for output.
If you run it as a program, try the subprocess module.

--
Gabriel Genellina

Mar 6 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Thomas Heller | last post: by
3 posts views Thread by winkatl1213 | last post: by
9 posts views Thread by jtravs | last post: by
1 post views Thread by moreati | last post: by
3 posts views Thread by Andrew Lentvorski | last post: by
3 posts views Thread by Paddy | last post: by
reply views Thread by Terry Reedy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.