好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

subprocess的实例不能pickle

subprocess的实例不能pickle

from subprocess import Popen, PIPE, STDOUT

cmd = '/home/mlzboy/my/ide/test/time_sleep.py'

p = Popen(cmd, shell=False, stdin=PIPE, stdout=PIPE, stderr=STDOUT, close_fds=True)

print type(p)

import pickle

pickle.dump(p,open("./p.pickle","wb"))

print "done!"

查看更多关于subprocess的实例不能pickle的详细内容...

  阅读:44次