![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
景彪
钻牛角尖.
展开
-
subprocess.Popen() 必须加上close_fds=True(
转自:http://blog.sina.com.cn/s/blog_524524850100wkvv.html今天在做一个web页面控制memcached重启的功能,本以为非常简单,不就获取pid,然后kill,在重新启动memcached就这么简单。没想到使用subprocess.Popen() 来调用命令时竟然发现response确实是返回到客户端了,但是服务器端和客户端的ht转载 2012-09-25 10:01:17 · 12802 阅读 · 0 评论 -
c调用python函数时,解析其返回值
The PyArg_ParseTuple() function is declared as follows:int PyArg_ParseTuple(PyObject *arg, char *format, ...);The arg argument must be a tuple object containing an argument list passed转载 2013-07-02 15:34:26 · 4227 阅读 · 0 评论