[C++-SIG] Python calling C++ issues

Ephi Dror ephi at adital.com
Wed Dec 1 19:37:13 CET 1999


Hi All,

Thanks a lot for all the support we got so far.

Unfortunately, as of this moment, we have not yet successfully run our
simple spam program.

It is partially worked but then we got the two unexplained strange phenomena
that as of now, nobody seems to understand why.
Also, even if we got those problems solved using compiler xyz version 123
who knows what other problems are waiting for us in the next corner.

It may work perfect on NT, Win98 , SUN, etc platforms but we need it to work
on  RedHat 6.1 using the  distributed Python 1.5.2 and  GNU as it come out
of the box when you install  Linux 6.1. For us, it just does not work.

I am personally very disappointed from all of this. I really truly wanted to
give python a chance. I got the impression by reading one of the Python
books back cover that what we want to do is common practice and should be  a
plug and play .
(http://www.amazon.com/exec/obidos/ts/book-reviews/1565921976/103-5409830-17
11020)
Reading the books give  the impression that Python and C++ were meant to
live in peace and be  haply  working with each other. Unfortunately, my
personal experience realty proved the opposite. Python may work nicely with
C code, but who needs that 30 days before the year 2000 !!, Programmers
today need at least integration with existing C++ code and very soon they
need integration with Java code.
Our example only had  the simplest C++ class in the word, and Python could
not even use it correctly. Is  just un believable to me.
It is possible that we made stupid mistakes in the code, it is also possible
that we are bad programmers. Who knows?. We did  not hide our code. In fact,
I attached it to my original email.

Does anyone know how much Python is really  used  on Redhat Linux with the
conjunction with C++, especially the direction of Python calling C++
functions?

We have not given up yet but we are close. I would love to hear from the
group that I am wrong. That I was just blind and simply did not get it.
That calling C++ class from Python is really a piece of cake after all and
especially on RedHat 6.1 Linux with standard  installation components.

Thank you all for helping us.

We hope to stay in the group and contribute in the future, but it all depend
on what next for us in terms of using Python/C++.

Ephi.
----- Original Message -----
From: Dror, Ephi <ephi.dror at cis.canon.com>
To: <mhammond at skippinet.com.au>; <c++-sig at python.org>
Sent: Wednesday, November 24, 1999 10:46 AM
Subject: RE: [C++-SIG] Python calling C++ issues


> Hi Mark,
>
> Thanks a lot again. We tried it but unfortunately it did not help in our
> case.
>
> Does anyone know where can we download C++ based debug version of Python
> 1.52 for Linux?
>
> Our next step is to use Python 1.52 which is compiled with C++ and
possibly
> a debug version and then try our little sample.
>
> Thanks a lot.
>
> Ephi.
>
> -----Original Message-----
> From: Mark Hammond [mailto:mhammond at skippinet.com.au]
> Sent: Wednesday, November 24, 1999 12:53 AM
> To: 'Ephi Dror'; c++-sig at python.org
> Subject: RE: [C++-SIG] Python calling C++ issues
>
>
> > Unfortunately, we don't seems to understand what do you mean
> > by "Object". Is
> > it something we need to define or is it already defined in a
> > h file that we
> > forgot to include. We use Linux/gcc environment.
>
> Sorry - I meant "PyObject"
>
> > Also, in our sample, we did not use virtual function
>
> Hmmm - OK - my advice could well be wrong.  Unless your C compiler
> always adds a vfptr.
>
> I have seen this problem (when using virtuals) before and the symptoms
> sound almost identical.  Try the code snippet I posted, and see if the
> debugger does show the "PyObject *" and the "Spam *" as different
> values, even though they are pointing to the same object.
>
> Otherwise Im afraid I have no idea...
>
> Mark.
>
>
> _______________________________________________
> C++-SIG maillist  -  C++-SIG at python.org
> http://www.python.org/mailman/listinfo/c++-sig
>
> _______________________________________________
> C++-SIG maillist  -  C++-SIG at python.org
> http://www.python.org/mailman/listinfo/c++-sig
>





More information about the Cplusplus-sig mailing list