boost::python and Date/Time values
Is there any easy way to get python Date, Time and DateTime values from boost::python::objects? In C, I'm using PyDateTime_GET_YEAR(), PyDateTime_GET_MONTH(), PyDateTime_GET_DAY(), etc, but it would be nice to use some C++ API for this. -- murrayc@murrayc.com www.murrayc.com www.openismus.com
On Sun, 2010-02-07 at 22:59 +0100, Murray Cumming wrote:
Is there any easy way to get python Date, Time and DateTime values from boost::python::objects? In C, I'm using PyDateTime_GET_YEAR(), PyDateTime_GET_MONTH(), PyDateTime_GET_DAY(), etc, but it would be nice to use some C++ API for this.
Any ideas? -- murrayc@murrayc.com www.murrayc.com www.openismus.com
Murray Cumming wrote:
On Sun, 2010-02-07 at 22:59 +0100, Murray Cumming wrote:
Is there any easy way to get python Date, Time and DateTime values from boost::python::objects? In C, I'm using PyDateTime_GET_YEAR(), PyDateTime_GET_MONTH(), PyDateTime_GET_DAY(), etc, but it would be nice to use some C++ API for this.
Any ideas?
Last time I had to do this it was for an app that had a custom date/time class on the c++ side, we rolled our own converters using the PyDateTime_*() methods. Some standard converters for boost::date_time classes would be nice... -t
participants (2)
-
Murray Cumming -
troy d. straszheim