美文网首页
Python send2trash

Python send2trash

作者: 一川烟草_满城风絮_梅子黄时雨 | 来源:发表于2018-05-12 21:43 被阅读0次

python的send2trash模块,顾名思义就是把一个文件丢入回收站。

import send2trash
baconFile = open('bacon.txt', 'a')
baconFile.write('Bacon is a vegetable')
baconFile.close()
send2trash.send2trash('bacon.txt')

相关文章

网友评论

      本文标题:Python send2trash

      本文链接:https://www.haomeiwen.com/subject/dznhdftx.html