Python - How do I convert “an OS-level handle to an open file” to a file object?

后端 未结 6 1681
谎友^
谎友^ 2021-02-01 00:57

tempfile.mkstemp() returns:

a tuple containing an OS-level handle to an open file (as would be returned by os.open()) and the absolute pathname of that fi

6条回答
  •  南笙
    南笙 (楼主)
    2021-02-01 01:07

    What's your goal, here? Is tempfile.TemporaryFile inappropriate for your purposes?

提交回复
热议问题