在 pythran 中使用日期时间
Use datetime in pythran
我正在使用pythran,一个Python到c ++编译器 http://pythran.readthedocs.io/
我们可以使用日期时间或任何其他方式在pythran函数中使用日期或时间信息吗?
from datetime import datetime
print datetime.now()
我得到:
$ 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)
pythran 不支持 datetime
模块,这可以从错误消息中推断出来。解决方法是:
- 从 Python 代码调用
datetime
并将结果传递给 Pythranized 函数 - 在项目的 GitHub 页面上填写一个问题。
相关文章:
- 使用 C++将时间戳转换为格式化的日期时间
- C++代码的 C# 日期时间等效项是什么?
- 如何在提升日期时间中创建日期范围?
- 在 c++ 中将 ISO 日期时间转换为本地日期时间并提取时间
- Rcpp/C++/R:比较日期时间矢量与日期时间时出错(错误:"运算符>"的不明确重载)
- 如何将毫秒的日期时间字符串转换为 UNIX 时间戳
- 扩展中的日期时间对象方法C++问题
- 将DateTime字符串分为C 的日期时间
- C++以微秒为单位解析日期/时间
- 仅将纪元字符串保存到 mysql 日期时间年/月/日,但没有小时分钟秒
- 使用提升解析日期时间字符串:采用个位数小时格式
- C++ Poco SQL 查询不返回具有'between'和'and'日期时间绑定的结果
- 快速将带有时区的日期时间字符串转换为 UNIX 时间戳(C++)
- 从C 的时间戳提取日期时间戳
- 标准::get_time 中的日期时间格式
- 生成包含分数和时区的完整 iso 日期时间表示字符串
- 通过 ODBC C++将带有日期时间的记录插入 SQL Server 2014 的问题
- 在 C++20 中获取当前日期/时间是否线程安全?
- mongocxx:插入日期时间
- Poco 日期时间格式化程序 - 使用当前时区打印时间戳