How can I construct a Python3 file object from a full file path (string)

后端 未结 0 368
面向向阳花
面向向阳花 2021-01-17 03:13

I am updating a mailer from Python2. There I used the line

attachFile.set_payload(file(attachment[1]).read())

How can I create the same effec

相关标签:
回答
  • 消灭零回复
提交回复
热议问题