繁体   English   中英

Cython,调用 shell 命令。 性能提升

[英]Cython, invoking shell comand. Performance gain

我的问题很简单。 使用 Cython 与纯 Python 调用 shell 命令或操作系统上存在的任何其他二进制可执行文件有什么好处?

而不仅仅是os.system() 并不真地。

os.system()的实现基本上是(删除了一些宏):

static long
os_system_impl(PyObject *module, const Py_UNICODE *command)
{
    long result;

    if (PySys_Audit("os.system", "(u)", command) < 0) {
        return -1;
    }

    result = _wsystem(command);
    return result;
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM