哪些脚本会放入Python包的bin文件夹中? [英] What scripts would go into a bin folder of a Python package?

查看:214
本文介绍了哪些脚本会放入Python包的bin文件夹中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从学习Python困难之道"中学习Python软件包,它说的其中一项练习是:

I'm learning about Python Packages from Learn Python the Hard Way and one of the exercises it says:

在可运行的bin目录中放置一个脚本

Put a script in the bin directory that you can run

对我来说,似乎有点含糊.我不太确定哪种脚本会进入bin文件夹. 《包装旅行者指南》

To me, it seems kind of vague. I'm not exactly sure what kind of scripts would go into the bin folder. The Hitchhiker's Guide to Packaging says

将您编写的,使用软件包的脚本,认为对您的用户有用的所有脚本放入bin中.如果没有,请删除bin目录.

put into bin any scripts you’ve written that use your package and which you think would be useful for your users. If you don’t have any, then remove the bin directory.

但是我仍然想知道将使用哪种脚本.因此,我知道这听起来像是一个愚蠢的问题,但是有人可以给我举一个例子,说明为什么以及何时将脚本"放入其程序包的bin文件夹中吗?

But I'm still left wondering what kind of script would go in there. So, I know its may sound like a dumb question, but can someone give me an example of when, and why one would put "a script" in their package's bin folder?

推荐答案

例如 Django的项目创建 Scrapy的项目创建,django-admin.py和scrapy都是bin文件夹中的脚本.

For example Django's project creating, Scrapy's project creating, django-admin.py and scrapy are both scripts in bin folder.

通过检查几乎基于python的工具,您可以获得更多示例.

You could get even more examples by checking almost python-based tools.

这篇关于哪些脚本会放入Python包的bin文件夹中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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