Ravi Kondamuru wrote:
Hi,
I am writing a script to read list output from a C executable. How
should c program be written so that python can read the output as a list?
Any pointers to info on this appreciated.
The possibilities are truly wide open on this. Python can read a
variety of standard formats (and of course can have custom code to read
anything. Depending on what the data involved actually are, you need to
decide what format works best.
A simple approach is to have the C program write simple CSV output, and
use Python's csv module to read it. A more complex solution might be to
use XML. There are approximately 52,495,102 other possibilities
available too, so you have lots of room to work out what's best for your
application. More specific information on what you're trying to
accomplish would help narrow it down as well.
_______________________________________________
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor