Use datetime in pythran

I'm working with pythran, a Python to c++ compiler

Can we use datetime or any other way to use in pythran function a date or a time info ?:

from datetime import datetime

I get:

$ pythran None None
CRITICAL I am in trouble. Your input file does not seem to match    
Pythran's constraints...
E: Attribute 'now' unknown (, line 13)


The datetime module is not supported by pythran, as can be deduced from the error message. Workarounds are:

  • call datetime from the python code and pass the result to the pythranized function
  • fill an issue on the github page of the project.
Posted on by serge-sans-paille

Relevant tags