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.
以下を使用して tmp ファイルを作成しています。
from tempfile import mkstemp
このファイルに書き込もうとしています:
tmp_file = mkstemp() file = open(tmp_file, 'w') file.write('TEST\n')
確かに、ファイルを閉じて適切に実行しますが、tmpファイルをcatしようとすると、まだ空です..基本的に見えますが、なぜ機能しないのかわかりません.