Hi all, I'd like to access the checkin and checkout time for a post from python.
Looking at src/post.cc there is a checkin variable available, unfortunately this is not exposed to python in src/py_post.cc. I've added .add_property("checkin", &post_t::checkin) to src/py_post.cc, which allows be to access checkin from python, but this results the following error: TypeError: No Python class registered for C++ class boost::optional<boost::posix_time::ptime> src/py_times.cc registers (optional and non-optional versions) of datetime_t with python, and datetime_t is a typedef for boost::posix_time::ptime in src/times.h, so certainly it all looks good. Here's my little python test script: import ledger journal = ledger.read_journal('test/baseline/opt-time-report.test') posts = journal.query('') for post in posts: print(post.checkin) Is there another way to access the timelog checkin and checkout times from python? If no, what changes are needed in order to fix the TypeError mentioned above? Thanks in advance, Alexis -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.