Python3项目删除__pycache__文件夹和.pyc文件 [英] Python3 project remove __pycache__ folders and .pyc files

查看:764
本文介绍了Python3项目删除__pycache__文件夹和.pyc文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从目录中清除所有 __ pycache __ 文件夹和 .pyc / .pyo 文件的最佳方法是什么python3项目。我已经看到多个用户建议与Debian捆绑在一起的 pyclean 脚本,但这不会删除文件夹。我想要一种简单的方法来整理项目,然后再将文件推送到我的DVS。

What is the BEST way to clear out all the __pycache__ folders and .pyc/.pyo files from a python3 project. I have seen multiple users suggest the pyclean script bundled with Debian, but this does not remove the folders. I want a simple way to clean up the project before pushing the files to my DVS.

推荐答案

当我自己找到答案时,将pyclean输错为pycclean:

I found the answer myself when I mistyped pyclean as pycclean:

    No command 'pycclean' found, did you mean:
     Command 'py3clean' from package 'python3-minimal' (main)
     Command 'pyclean' from package 'python-minimal' (main)
    pycclean: command not found

运行 py3clean。对其进行了很好的清理。

Running py3clean . cleaned it up very nicely.

这篇关于Python3项目删除__pycache__文件夹和.pyc文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆