Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Python ソケットで作業するときに makefile() を使用する目的は何ですか??
Python の send() 関数と recv() 関数だけでプログラムを動作させることができます。しかし、データをバッファリングするには makefile() メソッドを使用する方が良いと読みました。私はこの関係と違いを理解していませんでした...助けはありますか?
Tks !
makefilePythonのファイルインターフェースが便利な場合に使用できます。たとえばreadlines、ソケットのようなメソッドを使用できます(を使用する場合は手動で実装する必要がありますrecv)。これは、ソケットでテキストデータを送信する場合に便利ですが、YMMVです。
makefile
readlines
recv