[Tutor] Tutor Digest, Vol 106, Issue 42
Alan Gauld
alan.gauld at btinternet.com
Tue Dec 18 10:20:01 CET 2012
On 18/12/12 07:56, Peter Otten wrote:
>> myMain. The c file input content might change in the future like
>> different values assigned, added fields in the MainStruct, etc. Also I
>> am not permitted to change the c file.
>>
> How about running the C source with an added dump() function
>
That would have been my suggestion but he says he can't change the file.
Although one option might be to get Python to generate a *copy* of the C
file with a dump function added. And then compile a C driver program to
use that new C file and write out a copy of the data from generate().
Actually that might be the best approach...
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
More information about the Tutor
mailing list