在 Eclipse 中为项目的每个脚本设置运行配置

发布于 2024-12-19 22:24:22 字数 154 浏览 5 评论 0原文

我在 eclipse+pydev 中工作。在我的项目中,我有大约 100-200 个文件,每个脚本都可以执行。 Eclipse可以为每一项设置运行配置。但我想为项目设置一个运行配置,并且我想为每个启动脚本使用此配置。我需要这个,因为我有用于启动的自定义参数(但这个参数对于每个脚本都是相同的)。

I work in eclipse+pydev. In my projects I have approximately 100-200 files and every script can be execute. Eclipse can setup run configuration for every one by one. But I'd like to setup one run configuration for project and I'd like to use this configuration for every script for launch. I needed this because I have custom parameters for launch (but this parameters the same for every script).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

很酷又爱笑 2024-12-26 22:24:23

现在,这在 PyDev 中是不可能的,而且我不确定它是否会如此有用——如果您必须将某个参数传递给 200 个脚本,则通常的配置方式不会是作为命令行参数,但是通常通过环境变量或某些配置文件(其默认位置在 Linux 中为 ~/.my_app 或在 Windows 中使用 %APPDATA%/MyApp)。

如果您的用例由于某种原因与此不同,请在 PyDev 中创建功能请求(请参阅:http: //pydev.org/about.html 链接)解释您的用例。

如果您决定采用环境变量方式,则可以在启动 Eclipse 的 shell 中进行设置(但在启动 Eclipse 之前,如果更改则必须重新启动 Eclipse)或在解释器配置中进行设置(窗口 > 首选项 > 选项)。 pydev > 解释器 - Python > 环境)。

Right now that's not possible in PyDev, and I'm not sure it'd be so useful -- if there's some parameter you have to pass to 200 scripts, the usual way to have that configuration would not be as command line arguments, but usually through an environment variables or some configuration file (whose default location would be something as ~/.my_app in Linux or using %APPDATA%/MyApp in windows).

If you have a use-case that differs from that for some reason, please create a feature request in PyDev (see: http://pydev.org/about.html for links) explaining your use-case.

If you decide to go through the environment variables way, you can set it up in the shell where you start Eclipse (but before starting Eclipse and you must restart Eclipse if you change it) or in the interpreter configuration (window > preferences > pydev > interpreter - Python > environment).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文