[Tutor] Tutor Digest, Vol 106, Issue 42

Peter Otten __peter__ at web.de
Tue Dec 18 13:42:20 CET 2012


Alan Gauld wrote:

> 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...

If the customer is real the OP should at least talk to him. Of course I 
don't know whose money is being burnt, but I expect that neither side can 
afford to build a C interpreter in Python... 




More information about the Tutor mailing list