在PY2有XMLRPC newPaste - 預期與緩衝接口的對象
rv = xmlrpc.pastes.newPaste(language, code, None, filename, mimetype, private)
我得到錯誤:預期與緩衝接口的對象
無法找到任何XMLRPC文檔和PY3。我發現只有這個片段:
p1 = subprocess.Popen(['gpg','--clearsign'], stdin = subprocess.PIPE, stdout=subprocess.PIPE)
p1.stdin.write(bytes(input, 'UTF8'))
output = p1.communicate()[0]
s = ServerProxy('http://paste.pocoo.org/xmlrpc/')
pasteid = s.pastes.newPaste('text',output.decode())
print ("http://paste.pocoo.org/raw/",pasteid,"/", sep="")
但我仍然感到困惑吧......用我的版本很多爭論,我在哪裏可以找到它的完整描述/修復呢?
謝謝。
參數與您已經使用的參數相同。你只需要確保文本是'str',而不是'bytes'。 –