Hi Brett, I like the idea of embedding python interpreter in C (I use ansi C). In fact, this is probly the key to my question... Will look into this and figure out how to do it. Thanks again.
PS. In ref. to another Group member's response I certainly did not intend to monotonize the Q/A in the group, in fact this was my second question since i joined. My question was a simple one, and I was looking for a simple answer such as this one reached by Brett. This is a discussion a group after all... If this discussion irritated anyone sorry... /Mongi M. --- In [email protected], "Brett W. McCoy" <[EMAIL PROTECTED]> wrote: > > On 2/21/07, Mongi <[EMAIL PROTECTED]> wrote: > > > Brett thanks again for ur reply. The statements in file1 look as follows: > > > > var1=value1; var2=value2; > > ......... > > varn=valuen; etc... > > .......... > > > > where var1,2,... are declared variables names and value1,2,... are > > derived numbers from another program (which is Not a C-pgm this why i > > cannot use the external statements to get them...) Sometime during the > > solution, file1 contains less or more statements like that (ie, > > changing). > > What language is the other program written in? There are ways to > interface languages like Perl and Python with C... either by creating > C functions that are callable from Perl or Python, or vice versa -- > embedding a Perl or Python interpreter inside a C program and passing > data back and forth that way. > > A simpler option, of course, is to either have the other program write > data to a file or print data to stdout that can be read from the C > program via a pipe or a similar inter-process communication method. > > -- Brett > ------------------------------------------------------------ > "In the rhythm of music a secret is hidden; > If I were to divulge it, it would overturn the world." > -- Jelaleddin Rumi >
