[C++-sig] constructing datetime objects
gero_mailinglist at gmx.de
gero_mailinglist at gmx.de
Tue Sep 30 09:54:09 CEST 2003
Hi,
I am pretty new to boost python and consider integrating an existing C++
library into python 2.3. My C++ library defines its own datetime class, but I
think it is nicer if the python functions use the Python datetime module. How
do I write a function that returns a python datetime object, initialised e.g.
via an ordinal number or maybe year, month, day, etc. I have not found out
yet how to call a constructor in boost::python (Is there something in the
tutorial?). The other way, e.g. getting the year from a python datetime object dt
is no problem using
python::extract<int>(dt.attr("year")).
Thanks in advance,
Gero
--
NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService
Jetzt kostenlos anmelden unter http://www.gmx.net
+++ GMX - die erste Adresse für Mail, Message, More! +++
More information about the Cplusplus-sig
mailing list