[C++-sig] "print" member functions.
Pierre Barbier de Reuille
pierre.barbier at cirad.fr
Wed Feb 25 15:21:07 CET 2004
"print" being a reserved work, you cannot use it at all in python !!!
As pyste is in python, you cannot use any object named "print" ...
you'll have to change the C++ code or write a wrapper in C++
On Wed, 2004-02-25 at 14:55, Hanz Meizer wrote:
> Hi,
>
> I have classes that contain print member functions. If I try to call
> those from python, I get:
>
> print a.print()
> ^
> SyntaxError: invalid syntax
>
> I can't rename them, either:
> ------------ test.pyste ------------
> rename(test.print, "print_me")
> ------------------------------------
>
> gives:
> ------------------------------------
> execfile(interface, context)
> File "test.pyste", line 15
> rename(test.print, "print_me")
> ^
> SyntaxError: invalid syntax
> make: *** [test.cpp] Error 1
> ------------------------------------
>
> How can I get this print function wrapped and callable from python? (it
> returns void).
>
> H.
>
>
> _______________________________________________
> C++-sig mailing list
> C++-sig at python.org
> http://mail.python.org/mailman/listinfo/c++-sig
--
Pierre Barbier de Reuille
INRA - UMR Cirad/Inra/Cnrs/Univ.MontpellierII AMAP
Botanique et Bio-informatique de l'Architecture des Plantes
TA40/PSII, Boulevard de la Lironde
34398 MONTPELLIER CEDEX 5, France
tel : (33) 4 67 61 65 77 fax : (33) 4 67 61 56 68
More information about the Cplusplus-sig
mailing list