1

I'm working with pythran, a Python to c++ compiler http://pythran.readthedocs.io/

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

from datetime import datetime
print datetime.now()

I get:

$ pythran ccompile.py 
ccompile.py None None
CRITICAL I am in trouble. Your input file does not seem to match    
Pythran's constraints...
E: Attribute 'now' unknown (ccompile.py, line 13)
serge-sans-paille
  • 2,109
  • 11
  • 9
user3313834
  • 7,327
  • 12
  • 56
  • 99
  • 3
    what is `pythran`? besides, your question makes little sense can you explain what you're asking – EdChum Feb 09 '16 at 10:28

1 Answers1

1

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.
serge-sans-paille
  • 2,109
  • 11
  • 9