如何针对python HTTPConnection进行read()/write()?

2024-10-02 20:33:46 发布

您现在位置:Python中文网/ 问答频道 /正文

我有以下形式的python代码:

(o,i) = os.popen2 ("/usr/bin/ssh host executable")  
ios = IOSource(i,o)

然后对stream()进行写操作,然后使用stream()编写代码

是的,这里有IPC。。想想RPC。在

我想这样做,但要以HTTP方式而不是生成ssh。在

我以前用过python http:

^{pr2}$

如何从HTTPConnection获取inputstream/outputstream,以便我的lib代码可以像上面的ssh示例一样读/写?在


Tags: 代码httphoststreambinosusrrpc