Calling C++ function from python script

Pankaj pankajgode at gmail.com
Sun Jan 29 00:47:15 CET 2006


The examples given are too complicated.

So, if it can be explained using my sample example. Would be thankful
for that.

/***** 1.c  File ******/
func(  char a[10] )
{
      int i;
      for( i =0; i < 10; i++)
           printf("\n array element is: %c", a[i]);
}

/***** 1.py  File ******/

f = open( "x.txt", "r")
while 1:
     l = f.readline( )

=>> Here i want to call func() as
func( l)




More information about the Python-list mailing list