簡體   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